By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!Is there a way to to get the command line variable "%L" (set when "TCMD Prompt Here" is selected, as defined by tcmdhere.btm) in tcstart.btm?
I'd like to add some conditional functionality in tcstart.btm based on whether a startup directory was requested or not.
echo %@pidcommand[%@pid[tcmd.exe]]
I don't use SingleInstance (i.e. multiple instances are allowed), so that would work. It does seem to transit the parameters TCMD.EXE was launched with. But when launching a second instance, the parameters from the first instance are still in effect. Can that be avoided so that each instance would have the launch parameters from the associated TCMD.EXE?Code:echo %@pidcommand[%@pid[tcmd.exe]]
but that probably won't be useful if you have SingleInstance turned on, and you used "TCMD prompt here" to launch a second instance of Take Command.
I don't use SingleInstance (i.e. multiple instances are allowed), so that would work. It does seem to transit the parameters TCMD.EXE was launched with. But when launching a second instance, the parameters from the first instance are still in effect. Can that be avoided so that each instance would have the launch parameters from the associated TCMD.EXE?
This seems to be working for what I'm looking to do. Basically I want to set prompt to Desktop unless a directory is requested when TCMD is being invoked. Multiple instances are allowed.You might try %@PIDCOMMAND[%_PPID]
@ECHO OFF
prompt = $e[30;46;2m[$w]$e[40;36;1m$s[$t$h$h$h]#$e[40;37;2m$s
alias /R "c:\Users\Ville\My Documents\TCMD\aliases.tcmd"
path %path;%ProgramFiles(x86)\bind\
set startcommand=%@pidcommand[%_PPID]
set startdir=%@TRIM[%@word[2,%startcommand]]
msgbox ok "startcomand" startcommand is '%startcommand'
msgbox ok "startdir" startdir is '%startdir'
if %startdir == "" cdd desk:
cdd /to .
cls
Got it. Thanks so much for your help!You need the quotes:
*if "%startdir" == ""
You could also use:
if defined startdir ...