Sign in to follow this  
Followers 0
bigred

Controlcommand Problems

6 posts in this topic

Nothing except WinActivate and MsgBox are working. I know its something simple that I'm messing up, I just can't figure out what.

WinActivate("APP NAME", "")
ControlCommand ("APP NAME", "", "SysListView322", "SelectString", 'ITEM NAME')
$mn = ControlCommand ("APP NAME", "", "SysListView322", "GetCurrentSelection", "")
MsgBox(4096, "Test", "$mn")

Share this post


Link to post
Share on other sites



SysListView32 controls are not supported. If any ControlCommand() actually works on it, it's a fluke, more or less.

Share this post


Link to post
Share on other sites

Ok thats good to know.

But in this thread this-is-me was saying that it should work..?

http://www.autoitscript.com/forum/index.php?showtopic=120

Im getting kinda frustrated. Its no one's fault at all, its just that I don't really know how to program, yet I am trying to make this decent size application. :ph34r:

So far I have learned 4 other scripting/macro languages before I was pointed towards AI3. I think AI3 is what I need, but it seems I can't make any headway. About 70% of my program rests around harvesting the text from 2 SysListView32 lists. With the other versions of the program I built with the other langueages I used an OCR program called Kleptomania to harvest the text, but that has too many potential problems. Trids told me about a ListView extractor called CopyText, though he said he had probems using it with AI3. But again thats another 3rd party piece of software. I really want to be able to harvest these lists with a built in function for stability and ease of distribution. [/frustration_purge] :(

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

@bigred, I am so sorry to say that I am wrong. I have used controlcommand with listboxes and assumed that is what you referred to. If you really want to find some info on a syslistview32, then you can take this very dangerous approach:

focus the listview.

send f2. this tries to rename the item

send CTRL+C. this copies the name

send {ESC}. this cancels the rename

use clipget() to get the name of the item

send up, down, left, or right arrow keys to go to the next item

repeat until the item you need is in focus, then do what you want ({enter} to run, {appskey} to bring up a menu, etc.)

Edited by this-is-me

Who else would I be?

Share this post


Link to post
Share on other sites

Ohh thats very cool, dirty but it gets the job done. :ph34r: What about handling an unknown number of list items? I need to copy them all to an array, or a text file.

Share this post


Link to post
Share on other sites

I think you can rely on the fact that if the name you got from clipget comes up the same as the previous name, it probably is at the end of the list.


Who else would I be?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0