Jump to content
Sign in to follow this  
Mingre

GuiCtrlRead() - ing a ListView of an application?

Recommended Posts

Mingre

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

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
Mingre

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!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.