Damein Posted March 24, 2016 Share Posted March 24, 2016 (edited) So I've never actually tried to pull data from anything I've not created inside AutoIt and I can't seem to get it to work. What I am attempting to do is read the data displayed in this window here. I want to be able to grab the data in the "Status" column to start out with. Once I figure out that I think I'll be set. My mouse is currently over that column for the Window Info (Note: mousing over all columns result in the same ClassnameNN) I've tried using ControlGetText and ControlListView to no avail. But maybe I'm doing it wrong, here's to hoping! #include <MsgBoxConstants.au3> Opt("WinTitleMatchMode", 1) ;~ TAdvStringGrid3 Local $hWnd = WinWait("Ametek", "", 10) $Data = ControlListView($hWnd, "", "TAdvStringGrid3", "GetItemCount") If @Error Then MsgBox(0, "Test", @Error) EndIf ;~ Local $sClassList = WinGetClassList($hWnd) ; Display the classlist. MsgBox($MB_SYSTEMMODAL, "", $Data) Any help would be appreciated, thanks! *** EDIT *** Forgot to mention with the above code I don't get an error but my message box comes up as 0. Edited March 24, 2016 by Damein Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
Damein Posted March 29, 2016 Author Share Posted March 29, 2016 Sorry if its not allowed but just curious if anyone has any thoughts on this? Thanks Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
LarsJ Posted March 30, 2016 Share Posted March 30, 2016 This is allowed. The problem is that your control is not a standard Windows control, but some kind of a grid control. ControlGetText and ControlListView and similar commands can only be used for standard controls and standard listviews (ListView32/SysListView32 controls). To get information from a grid control you can use the UI Automation framework. Check with the "Simple spy demo" or Inspect.exe from Windows SDK if you can read data in the grid control. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now