Jump to content

Getting existing Listview information


atm
 Share

Recommended Posts

I am trying to find a way to read information in an existing Listview box. My goal is to have stats of printers in the windows printers menu (control panel) and make alert messages appear when one goes on "error" status. However, I can't seem to find out how to grab the information contained in the existing list view.

If you are running windows, go to control panel > printers and make the view "details"

Using the window info tool, it says the window with the text is in the control"SysListView32" (I'm running 2000 btw), but no matter what I try I can't seem to grab the information inside of the list.

Any advice?

Link to comment
Share on other sites

I am trying to find a way to read information in an existing Listview box. My goal is to have stats of printers in the windows printers menu (control panel) and make alert messages appear when one goes on "error" status. However, I can't seem to find out how to grab the information contained in the existing list view.

If you are running windows, go to control panel > printers and make the view "details"

Using the window info tool, it says the window with the text is in the control"SysListView32" (I'm running 2000 btw), but no matter what I try I can't seem to grab the information inside of the list.

Any advice?

Have you looked at the GUIListView Management functions in the help file under UserDefined Functions?

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Have you looked at the GUIListView Management functions in the help file under UserDefined Functions?

Yes, I have. But most of not all of the examples show how to get information from them when you create the listview, carrying it in variables. I am trying to get information from a listview that is created through windows, and I'm not sure what syntax to use. Since the window class it is in is "SysListView32" I have tried that in quotes, using [class:SysListView32] and so on. Mostly I just don't know how to grab information in it, and I have looked through the documentation for a good while.
Link to comment
Share on other sites

To use GuiListView UDF functions you need to know listview handle.

So $hLV = ControlGetHandle('window title', '', '[Class:SysListView32]') would make sense, no?

But I suspect that for your needs, ControlListView() would be enough. Just read the documentation.

"be smart, drink your wine"

Link to comment
Share on other sites

To use GuiListView UDF functions you need to know listview handle.

So $hLV = ControlGetHandle('window title', '', '[Class:SysListView32]') would make sense, no?

But I suspect that for your needs, ControlListView() would be enough. Just read the documentation.

Oh i think i see now! I used this:

CODE
$test = controllistview("Printers","","SysListView321","gettext",2,2)
And it seemed to work!

I kept trying to use "_GUICtrlListView" functions, but never thought of using the "controllistview"

Thanks a lot, now I think i have the hang of this. This is an awesome tool with endless possibilities, and you guys/gals are great to be helping people out. Kudos to all of you.

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