I just made a button to start TC with params like:
Code: Select all
/S=S "%P" "%T"
Moderators: Hacker, petermad, Stefan2, white
Code: Select all
/S=S "%P" "%T"
Code: Select all
/S=S "%T" "%P"
Code: Select all
cm_FileSyncExternal - open a new instance of TC with /S and current folders
Code: Select all
#NoTrayIcon
fstTitle = ""
WinGet, ControlList, ControlListHwnd , A
Loop , Parse, ControlList, `n
{
WinGetClass, control_class, ahk_id %A_LoopField%
StringGetPos, pos, control_class, TPathPanel
if pos >= 0
{
if fstTitle = ""
{
WinGetTitle, fstTitle, ahk_id %A_LoopField%
WinGetPos, fstX,,,, ahk_id %A_LoopField%
}
else
{
WinGetTitle, sndTitle, ahk_id %A_LoopField%
WinGetPos, sndX,,,, ahk_id %A_LoopField%
if fstX < sndX
{
left := RegExReplace( fstTitle, "(.*\\).*", "$1")
right := RegExReplace( sndTitle, "(.*\\).*", "$1")
}
else
{
left := RegExReplace( sndTitle, "(.*\\).*", "$1")
right := RegExReplace( fstTitle, "(.*\\).*", "$1")
}
break
}
}
}
Run, "%COMMANDER_PATH%\TOTALCMD.EXE" "/i=%COMMANDER_INI%" /S=S "%left%" "%right%