Jump to content

GuiCtrlRead() - ing a ListView of an application?


Recommended Posts

Is it possible to "read" the contents of a listview control not created by GUICtrlCreateListView? I learned from the help file that to retrieve the data on a currently-selected line of a listview, GUICtrlRead(GUICtrlRead($listview) should be used.

I'm trying to do the same on a listview of another software. The ClassNN displayed on the Control Viewer is:

[CLASS:ListView20WndClass; INSTANCE:2]

So, my trial script would be:

$listview = "[CLASS:ListView20WndClass; INSTANCE:2]"
$read = GUICtrlRead(GUICtrlRead($listview)
Msgbox(0,"",$read)

The problem is, the return value is always 0 even if I select a row on a listview.

Is it just not possible? Or am I doing something wrong here?

Thanks!

Edited by Lilbert
Link to comment
Share on other sites

See ControlListView() in the help file. For more advanced functions look at _GUICtrlListView_GetItemText() and _GUICtrlListView_GetItemTextArray() in the help file.

As you found, GuiCtrlRead() is intended to work with the native AutoIt controls, not those of other apps.

:huh2:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

See ControlListView() in the help file. For more advanced functions look at _GUICtrlListView_GetItemText() and _GUICtrlListView_GetItemTextArray() in the help file.

As you found, GuiCtrlRead() is intended to work with the native AutoIt controls, not those of other apps.

:huh2:

Works like a miracle. Thanks!

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...