MartyCologne 0 Posted July 3, 2019 (edited) Hi, basically, what I would like to do, is to search a listview for a specific text entry and click the item, as if one would have selected an entry in a menu. I was already able to create the code that does most of it: open the related app, work on the splash screen, open the desired window and also find the entry I am looking for. But I keep getting lost at the last step, which is to click the entry and make the overlying program do something with that. I have been able to SELECT the text entry in the list, but that is not same as CLICK the entry. ControlTreeView( "MyWindowname", "", $myID, "Select", $location ) will work with the control (SELECT it), but the $location is not an x/y pos. but an index, and I have not found a way to convert the index to an x/y pos accordingly that could be applied on a mouseclick action. The index of the text line was found in a loop that browses through all text lines of the control by node and subnodes. There is no direct selectentry(mytext) that does this for me. AutoIt v3 Window Info tool reveals the ControlClick Coords of a control in tab "Control", so it actually shows me the correct x/y-position of the SELECTED line, but: Which function do I need to use on a control to get these values? All I could find was ControlGetPos ( "title", "text", controlID ). This does not work in my case because apparently $myID does not identify the text string as desired as in this case the controlID was found by using command $myID = _WinAPI_GetDlgCtrlID($hMenu). ATM I cannot show a screenshot of the listview because of issues in company, I have to describe rather. So, the missing steps atm are: convert index to coordinates, use mouseclick (x/y) to click on these coordinates. What am I missing? Thanks a lot for your comments, this has been a big issue for me for long time and nothing has really worked. BTW: listview control is this type of control: WindowsForms10.SysTreeView32.app.0.141b42a_r18_ad1. MartyCologne. There used to be a question here https://www.autoitscript.com/forum/topic/155847-get-controlclick-coords/ where a user needed to know how to get the coordinates of a control and had a similar problem, but his solution does not work for me. Edited July 3, 2019 by MartyCologne Share this post Link to post Share on other sites
Nine 993 Posted July 3, 2019 (edited) _GUICtrlTreeView_DisplayRect ? Edited July 3, 2019 by Nine Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Multi-keyboards HotKeySet Fast and simple WCD IPC Multiple Folder Selector GIF Animation (cached) Share this post Link to post Share on other sites
MartyCologne 0 Posted July 4, 2019 23 hours ago, Nine said: _GUICtrlTreeView_DisplayRect ? From what I understand, _GUIx commands are only for GUIs that were created with AutoIt itself. In my case the GUI is from an external application and I was not able to get the xy-Pos. using the _GUI-command. Share this post Link to post Share on other sites
Nine 993 Posted July 4, 2019 (edited) 1 hour ago, MartyCologne said: From what I understand, _GUIx commands are only for GUIs that were created with AutoIt itself. In my case the GUI is from an external application and I was not able to get the xy-Pos. using the _GUI-command. No, you can use _GUI* function (at least some of them) on external application as long as you can get the handle of the object. Here an example of another way to do it : Local $hWnd = WinGetHandle ("AutoIt Help") WinActivate ($hWnd) WinWaitActive ($hWnd) Local $hTreeView = ControlGetHandle ($hWnd, "", "[CLASSNN:SysTreeView321]") ControlTreeView ($hWnd, "", $hTreeView, "Expand", "#1") ControlTreeView ($hWnd, "", $hTreeView, "Expand", "#1|#1") ControlTreeView ($hWnd, "", $hTreeView, "Select", "#1|#1|#3") ControlSend ($hWnd, "", $hTreeView,"{ENTER}") You must start autoit help before running the example... Edited July 4, 2019 by Nine Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Multi-keyboards HotKeySet Fast and simple WCD IPC Multiple Folder Selector GIF Animation (cached) Share this post Link to post Share on other sites