Fehera Posted June 25, 2019 Share Posted June 25, 2019 Hi, We have a desktop application that have dozens of pop up windows. I can find the windows very easily and control the application using the Control functions, however, I came across a control that I can't get the text out of it. According to the Window Info tool this control is a "listControl" which looks to me as a listview. (Attached images) I've tried the below: WinActivate("Sales Orders") Local $txt = ControlListView("Sales Orders", "", "listControl1", "GetText", 10, 1) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $txt = ' & $txt & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console Local $stext = ControlGetText("Sales Orders", "", "listControl1") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $stext = ' & $stext & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console Local $hwnd = ControlGetHandle("Sales Orders", "", "listControl1") Local $test = _GUICtrlListView_GetItemTextArray($hwnd) _ArrayDisplay($test) Local $hwnd = WinGetHandle("Sales Orders") ConsoleWrite("! " & _WinAPI_GetWindowInfo($hWnd) & @CRLF) _ArrayDisplay($hwnd) Please note, I've tried using the "listControl1", "[NAME:listControl1]", ID of the control, Class of the control, but the output is the same. And the output is: Starting file test.au3... @@ Debug(8) : $txt = 0 >Error code: 1 @@ Debug(11) : $stext = >Error code: 1 ! test.au3 -> Exit Code: 0 (Runtime: 4.07 sec) Unfortunately this system is not under our control and get this list in a separate (csv, excel) report would be painful, so I try to grab this information from this List control. I'm not waiting for a fully working code here, but could please someone point me in the right direction? I might just don't see the obvious here. Many thanks in advance. Link to comment Share on other sites More sharing options...
Earthshine Posted June 25, 2019 Share Posted June 25, 2019 you might have to use UIAutomation, See FAQ 31 My resources are limited. You must ask the right questions 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