Sign in to follow this  
Followers 0
trids

Selecting a specific item in a listview

13 posts in this topic

#1 ·  Posted (edited)

AI3 spy tells me that the listview I want to play with is called SysListView321. Now, is there a way to select a specific listitem there?

I'm thinking maybe somehow with ControlCommand()?? Or is my lateral solution the regular/preferred way ..

;Lateral Solution
ControlLeftClick ($sTitle, "", "SysListView321")    ;setfocus on the listview
Send ("{DOWN}" & $sListItemCaption)    ;use intellisense to target the listitem

TIA

Edited by trids

Share this post


Link to post
Share on other sites



Thanks Larry, I agree .. "priorities". Hope the kids get better soon B)

Meantime, my lateral solution is working okay, and it's a comfort to know I haven't missed something obvious :whistle:

Share this post


Link to post
Share on other sites

Has their been any progress with this set of commands? I am working on a project that uses AutoIt's activeX version with VB, and some commands like these would be perfect right now.

The Window Spy gives me the info "Class: SysListView321 Text: List1", and "Class: SysListView322 Text: List1". I need a way to extract the text from the windows, and so far the only way I've been able to do that is with a special OCR program.

Share this post


Link to post
Share on other sites

You might also try the program CopyText http://www10.pair.com/vsap/FreeSoft.html

CopyText works really well manually; however, I've had problems automating it with AutoIt :ph34r:

<{POST_SNAPBACK}>

Cool, thanks for the link, I'll check that out.

Only thing is Im already using a 3rd party piece of software, and so far its been 99% correct, so I don't really have a problem there. My real concern is that I want to give this program to other people I know, and having them install extra software isn't going to work in this case. :(

But this progam is very encouraging. At least we know it can be done.

Share this post


Link to post
Share on other sites

I really should look into the listview thing but hard to get time. If any of the devs can have a look at how to interact with them then that would be cool. Even at a high level (I think larry had a quick look and it involved shared memory and things) and I can take care of the rest.

Share this post


Link to post
Share on other sites

ControlCommand("Title", "", "SysListView321", "SelectString", 'string') works perfectly for me.


Who else would I be?

Share this post


Link to post
Share on other sites

That didn't do anything for me.

Is there anything else I need to do to get that to work?

Share this post


Link to post
Share on other sites

Did you change the parameters to suit your current situation?


Who else would I be?

Share this post


Link to post
Share on other sites

ControlCommand("AppName", "", "SysListView322", "SelectString", 'string') Is that right?

Do I need to specify 'string'? Also where is the list info copied to? Clipboard, or a variable?

Share this post


Link to post
Share on other sites

Yes you need to specify string, and all this does is to select the list item in the listbox, not copy the info to anywhere. You would need to use controlcommand with GetCurrentSelection to return what is selected.


Who else would I be?

Share this post


Link to post
Share on other sites

@all, 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.)


Who else would I be?

Share this post


Link to post
Share on other sites

If I knew how, I'd be all over it.

But that link you posted makes my face do this > :ph34r:

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