Jump to content

Selecting a specific item in a listview


trids
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • 7 months later...

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.

Link to comment
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.

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
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?
Link to comment
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?
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...