synchronize dirs: go to the current dir in the (2-nd??) TC?

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
leopoldus
Senior Member
Senior Member
Posts: 221
Joined: 2004-11-21, 09:47 UTC

Post by *leopoldus »

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!
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Single user license #329241
PowerPro scripts for Total Commander
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Update for TC 7.50 (tested with RC1) in TCWiki:
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!
Terka
Senior Member
Senior Member
Posts: 326
Joined: 2006-05-24, 09:04 UTC

Post by *Terka »

hi all, please can it be updated to version 9?
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Done - updated AHK script in TCWiki for TC 9.0a and added some additional fixes.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Terka
Senior Member
Senior Member
Posts: 326
Joined: 2006-05-24, 09:04 UTC

Post by *Terka »

Thank you! will try it.
Terka
Senior Member
Senior Member
Posts: 326
Joined: 2006-05-24, 09:04 UTC

Post by *Terka »

StatusQuo, can you please give me some comments about the script - cant read it properly, even if im using AHK too.
Is there any documentation/hints how to see the texts not visible by AU3_Spy ?
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

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.

Code: Select all

	ControlGetFocus, Panel_id
gets the Listbox control name,

Code: Select all

	LB_GETCARETINDEX := 0x019F
	SendMessage, %LB_GETCARETINDEX%, 0, 0, %Panel_id%
	LB_CursorPosition := ErrorLevel
stores the selected line number in LB_CursorPosition
(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
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.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Terka
Senior Member
Senior Member
Posts: 326
Joined: 2006-05-24, 09:04 UTC

Re: synchronize dirs: go to the current dir in the (2-nd??) TC?

Post by *Terka »

can you please update the script to latest TC version?
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Re: synchronize dirs: go to the current dir in the (2-nd??) TC?

Post by *StatusQuo »

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:

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!
Post Reply