And for good measure, an AHK solution:
In Total Commander, create user-defined command:
em_ShiftEnter
Assign to TC Shortcut (Hotkey) Shift + Enter
Command: "%ProgramFiles%\AutoHotKey\AutoHotKey.exe" "C:\Location\of\Scripts\TCShiftEnter.ahk"
Parameters: "%O" "%E"
Create TCShiftEnter.ahk, put in scripts location (C:\Location\of\Scripts)
Code: Select all
;;
;; TCShiftEnter.ahk
;;
ControlGetFocus, aControl, A
if( !RegExMatch( aControl, "^TMyListBox[1-2]$" ))
{
Send, +{Enter}
return
}
ext = %2%
if( RegExMatch( ext, "i)^(bat|cmd)$" ) )
Run, cmd.exe /k "%1%.%2%"
else
Run, "%1%.%2%"
return
Where you would like to use tcc.exe instead of cmd.exe, replace above.
Advantage,
1) can launch any file with it's associated program.
2) If the File is .cmd or .bat will launch a cmd prompt window instead.
3) AutoHotKey.exe and related .ahk scripts can be contained within the TotalCmd path -- instead of having to be copied to C:\Windows (i.e. noClose.pif).
(Can probably be done with a basic .cmd script as well, though without the Control checking exceptions)
Edit: Removed "cmd.exe /c START" from the 2nd Run statement (not needed).