Page 1 of 4
Problem using external sync dir to avoid modal dialog
Posted: 2009-04-17, 01:37 UTC
by Samuel
I just tried to use the external sync dir to avoid the modal dialog of sync dir keeping the focus.
I just made a button to start TC with params like:
So far so good. I would like to see 2 params like "%Pl" and "%Pr" for left and right path in TC. It will be very useful, because its confusing to have the folders the other way round if the right pane has focus.
Posted: 2009-04-17, 02:22 UTC
by fenix_productions
2
Samuel
Just quick guess before sleep
Have you tried using
/P=L /S=S "%P" "%T" parameters?
Posted: 2009-04-17, 07:04 UTC
by Samuel
No that doesn't changed it.
If I wanted to swap panels (if you tried this), then I could use:
But the problem is then that you don't know when the right pane has focus. Also you would have to run a conditional command...
I ask for this little thing because it is VERY important not to mess sync files. It could result in heavy data loss, if you sync the wrong way. And when I start sync from TC I am used to the fact that left side is left side.
But with focus on the right pane, the sync tool starts with folders arranged the other way round.
Posted: 2009-04-17, 07:19 UTC
by Samuel
It could also solved by creating an internal command like:
Code: Select all
cm_FileSyncExternal - open a new instance of TC with /S and current folders
It would be easy for TC to determine the left and right path and use it as param.
Posted: 2009-04-17, 10:49 UTC
by ghisler(Author)
Good point, there are indeed no parameters right now for left and right directory.
Posted: 2009-04-17, 16:49 UTC
by Samuel
Thanks!
Posted: 2009-04-22, 05:48 UTC
by Lefteous
An alternative could be to use this behavior (start new instance with just sync dirs) by default when exectuing cm_FileSync. I don't see any crucial disadvantages.
Posted: 2009-04-22, 06:03 UTC
by Samuel
Support++;

No more new users will request it in the forum.
Posted: 2009-04-30, 07:04 UTC
by MC
Yes Yes Yes! I want it like that!
Posted: 2009-04-30, 07:17 UTC
by Lefteous
... and don't forget to support the same behavior for SYNCOPEN as well

Posted: 2009-04-30, 16:41 UTC
by Samuel
Was sure it would made it to pb2...
Posted: 2009-05-09, 18:37 UTC
by m^2
Support++.
I was about to get a modeless cm_FileSync equivalent by calling a new TC instance with a /S=S parameter, but in 50% of cases it flips the sides.
BTW if anybody has an AHK / PPro script that reads left / right paths I'd very much like to see it.
Posted: 2009-05-09, 21:05 UTC
by m^2
OK, I wrote this already. If sb.'s interested:
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%
I still think that it would be good not to have to use such tricks.
Posted: 2009-05-09, 21:18 UTC
by m^2
Oh, I wasn't the first to think about it.

Strangely, my search didn't return your topic, but this one. Hacker, can you move my posts?
Posted: 2009-05-09, 23:18 UTC
by Hacker
[mod]Three previous posts moved from
New button-bar parameter desired.
Hacker (Moderator)[/mod]