Problem using external sync dir to avoid modal dialog

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Problem using external sync dir to avoid modal dialog

Post 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:

Code: Select all

/S=S "%P" "%T"
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.
Last edited by Samuel on 2009-04-17, 07:06 UTC, edited 1 time in total.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Samuel
Just quick guess before sleep ;)

Have you tried using /P=L /S=S "%P" "%T" parameters?
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

No that doesn't changed it.

If I wanted to swap panels (if you tried this), then I could use:

Code: Select all

/S=S "%T" "%P"
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.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post 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.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48107
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Good point, there are indeed no parameters right now for left and right directory.
Author of Total Commander
https://www.ghisler.com
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

Thanks!
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post 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.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

Support++;

:arrow: No more new users will request it in the forum.
MC
Senior Member
Senior Member
Posts: 402
Joined: 2003-02-05, 13:53 UTC

Post by *MC »

Yes Yes Yes! I want it like that!
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

... and don't forget to support the same behavior for SYNCOPEN as well ;-)
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

Was sure it would made it to pb2...
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post 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.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post 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.
Last edited by m^2 on 2009-05-10, 08:47 UTC, edited 1 time in total.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post 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?
User avatar
Hacker
Moderator
Moderator
Posts: 13073
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod]Three previous posts moved from New button-bar parameter desired.

Hacker (Moderator)[/mod]
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply