synchronize dirs: go to the current dir in the (2-nd??) TC?
Moderators: white, Hacker, petermad, Stefan2
2StatusQuo
Thanks for explanation, now everything is clear: not only how these options work, but as well what for they should be used.
Regarding archives... I don't think it is to be so important. If somebody really need to work with archives, he/she should find look for some more special tool.
Your script now is fine and it does as much as one could wait in order to extend TC's synchronizing feature. Thank you very much!
Thanks for explanation, now everything is clear: not only how these options work, but as well what for they should be used.
Regarding archives... I don't think it is to be so important. If somebody really need to work with archives, he/she should find look for some more special tool.
Your script now is fine and it does as much as one could wait in order to extend TC's synchronizing feature. Thank you very much!
- Vochomurka
- Power Member
- Posts: 814
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
Update for TC 7.50 (tested with RC1) in TCWiki:
AutoHotkey: From FileSync open another TC instance with selected files
AutoHotkey: From FileSync open another TC instance with selected files
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
Terka, the hint I got was from icfu in this post.
This is how the code works:
Getting the contents (individually for each line) is done by sending DDE messages to the TC Sync window;
MS offers some documentation e.g. here. gets the Listbox control name,
stores the selected line number in LB_CursorPosition
(LB_GETCARETINDEX = 0x019F is the command,
result is returned via Errorlevel), puts the line's content into LB_CursorLine
(LB_GETTEXT = 0x0189 is the command,
&LB_String is a pointer to some memory address where the result shall be stored,
VarSetCapacity reserves some storage space there before using it).
The Loop then starts at the known cursor position and goes up until it finds the subfolder the selected file is in,
which is combined with the base folders, that can be retrieved from the controls on the top using AU3_Spy.
This is how the code works:
Getting the contents (individually for each line) is done by sending DDE messages to the TC Sync window;
MS offers some documentation e.g. here.
Code: Select all
ControlGetFocus, Panel_id
Code: Select all
LB_GETCARETINDEX := 0x019F
SendMessage, %LB_GETCARETINDEX%, 0, 0, %Panel_id%
LB_CursorPosition := ErrorLevel
(LB_GETCARETINDEX = 0x019F is the command,
result is returned via Errorlevel),
Code: Select all
LB_GETTEXT := 0x0189
VarSetCapacity(LB_String, 1024, 0)
SendMessage, %LB_GETTEXT%, %LB_CursorPosition%, &LB_String, %Panel_id%
LB_CursorLine := LB_String
(LB_GETTEXT = 0x0189 is the command,
&LB_String is a pointer to some memory address where the result shall be stored,
VarSetCapacity reserves some storage space there before using it).
The Loop then starts at the known cursor position and goes up until it finds the subfolder the selected file is in,
which is combined with the base folders, that can be retrieved from the controls on the top using AU3_Spy.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
Re: synchronize dirs: go to the current dir in the (2-nd??) TC?
can you please update the script to latest TC version?
Re: synchronize dirs: go to the current dir in the (2-nd??) TC?
2Terka
I'm not sure, what needs to be updated:
I'm still using script V0.21 from TCWiki up to TC 7.22a (32bit) regularly and encountered no problem so far.
With TC 7.50b9 and 64bit versions I did some tests, too - seems to work fine here.
Can you provide some details, what's not working, please?
And (if you changed them) what settings you use in the script:
I'm not sure, what needs to be updated:
I'm still using script V0.21 from TCWiki up to TC 7.22a (32bit) regularly and encountered no problem so far.
With TC 7.50b9 and 64bit versions I did some tests, too - seems to work fine here.
Can you provide some details, what's not working, please?
And (if you changed them) what settings you use in the script:
Code: Select all
boAlwaysOpenNewTask := 0 ; set to 1 to not re-use TC target window (always open a new one)
boCdToFolderOnly := 0 ; set to 0 to have cursor placed on selected files; uses Lister (experimental?)
iListerTimeOutSecs := 1 ; if using Lister: timeout after n seconds of not appearing Lister
TCSync2nd_RunAsAdmin := 0 ; set to 1 to start 2nd TC as other user, e.g. administrator
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!