[Autohotkey] reading the sync tool list

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

[Autohotkey] reading the sync tool list

Post by *sgp »

I'm using an AHK script to read the difference list from the sync tool window. ControlGet reads a maximum of 1000 rows from the control, so I'm asking for help on how to read all rows.

Code: Select all

Nulls = 0
Total = 0
ControlGet, Subject, List, , TbkGndListBox1
Loop, Parse, Subject, `n
	{
		++Total
		If( A_LoopField ) {
		} Else {
			++Nulls
		}
	}
MsgBox, Control has %Total% rows, %Nulls% of them are empty.
Like I said, if the sync tool has more than 1000 lines you will see a non-zero count for Nulls. I tested it with both AHK and AHK_l.

Nirsoft's sysexporter has the same limitation, it retrieves just 1000 non-null rows starting at the n-th row which coincides with the top visible row in the control window.

So I guess there must be some technique around this. I suppose I need an outer loop to chunk out the whole control list by 1000-row steps, but I can't find suitable keywords in the Autohotkey help file. Or scroll the list by 1000-row steps, but again I can't find how to do that.
Or maybe I'm using the a completely wrong approach. Please advise me.

Another AHK and AHK_l issue I have is this
ControlGet, Max, List, Count, TbkGndListBox1

doesn't return the total number of rows into Max. Instead it retrieves text from the control, just as if Count wasn't there. What am I doing wrong?
TIA
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

I cannot comment on this problem, but you could try to get the list via clipboard by sending Ctrl+A, Ctrl+C.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Thanks Flint. It's a good idea, I might use it if I won't succeed reading the whole control directly. However I suspect the clipboard has its own limitations too. I tried copy/pasting a sync dialog with 80K+ entries and TC froze so I killed it after a couple of minutes. More testing needed.

At this stage I still hope to be able to read the whole control. Currently I need to figure out how to programatically scroll down the sync window one row at the time, like by sending the {Down} key, but with SendMessage, if that's faster than Send.
Post Reply