Triki Posted March 21, 2021 Share Posted March 21, 2021 I'm trying to manipulate an application with an integrated ListView named SysListView321. I can select an item with Autoit ControlListView($Wnd,"","SysListView321","Select",15,0) ...but... The only way to confirm the selection of the selected item is to point it with the mouse pointer and click the left button. I'm already looking for days to find a way to automate this but can't find any solution. I'm using Autoit and C#. Is there somebody who knows how to do this manipulation automatically? Link to comment Share on other sites More sharing options...
Nine Posted March 21, 2021 Share Posted March 21, 2021 Read help file about : _GUICtrlListView_ClickItem In fact the whole UDF should greatly enhance your capabilities to interact with this type of control. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Danp2 Posted March 21, 2021 Share Posted March 21, 2021 42 minutes ago, Triki said: I'm using Autoit and C#. Is there somebody who knows how to do this manipulation automatically? You're using AutoItX, correct? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Triki Posted March 22, 2021 Author Share Posted March 22, 2021 19 hours ago, Nine said: Read help file about : _GUICtrlListView_ClickItem In fact the whole UDF should greatly enhance your capabilities to interact with this type of control. Thank you for this information. I have tried this already but the application is really poorly constructed or overprotected. You can select an item via script but you have to click on it with the mouse to transfer it to a label. Per label you can add a number in a textbox 'Edit1' and then click on a button to save it. The manipulation to click on the item is the trap that I do not get around. Link to comment Share on other sites More sharing options...
Nine Posted March 22, 2021 Share Posted March 22, 2021 Show a snippet of the code you got that causing you the issue. From what application is that ListView from ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Triki Posted March 22, 2021 Author Share Posted March 22, 2021 18 hours ago, Danp2 said: You're using AutoItX, correct? Yes, via c# i make a connection with the AutoItX3Lib to use Autoit integrated. Link to comment Share on other sites More sharing options...
Triki Posted March 22, 2021 Author Share Posted March 22, 2021 (edited) 25 minutes ago, Nine said: Show a snippet of the code you got that causing you the issue. From what application is that ListView from ? I do not have access to the code of the application. The application is provided by an international company and does not release its source codes. Therefore, I am also dependent on Autoit for some manipulations. My code is very simple Local $Wnd = WinActive("ESZ toewijzen") ControleListView($Wnd,"","SysListView321","Select",15,0) ;Works _GUICtrlListView_ClickItem("SysListView321",15,"Left",False,1) ;Dont works OR _GUICtrlListView_ClickItem($Wnd;15,"Left",False,1) ;Dont works Mouse down and Controle_Mouseclick also don't works. Edited March 22, 2021 by Triki Link to comment Share on other sites More sharing options...
Danp2 Posted March 22, 2021 Share Posted March 22, 2021 AFAIK, you can't use any UDFs with AutoItX Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Nine Posted March 22, 2021 Share Posted March 22, 2021 Your statements are wrongly formatted : _GUICtrlListView_ClickItem("SysListView321",15,"Left",False,1) ;Dont works OR _GUICtrlListView_ClickItem($Wnd;15,"Left",False,1) ;Dont works You need to get the handle of the control, something like this should work : Local $hWnd = WinActivate("ESZ toewijzen") WinWaitActive($hWnd) Local $hCtrl = ControlGetHandle($hWnd, "", "SysListView321") _GUICtrlListView_ClickItem($hCtrl, 15) I cannot more strongly recommend that you put error handling after each statement to ensure everything is going as expected (not done on my snippet). “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Triki Posted March 22, 2021 Author Share Posted March 22, 2021 Nine, You are the best ! The script does exactly what I expect it to do. Thank you! Link to comment Share on other sites More sharing options...
Nine Posted March 22, 2021 Share Posted March 22, 2021 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Triki Posted March 25, 2021 Author Share Posted March 25, 2021 HELP !!! New problem I tried to integrate the Autoit script into my C# project but you apparently can't use UDF functions with the AutoitX3lib DLL, only the native functions included in it. In another topic of this forum I read: If you REALLY want to use _GUICtrlListView_ClickItem, open the GUIListView.au3 file, find the function and see how it is done there. Note that that function uses MouseClicks. I have done that but I can' t get that puzzle done to convert to c# @Nine Can you help me ... again? Link to comment Share on other sites More sharing options...
Developers Jos Posted March 25, 2021 Developers Share Posted March 25, 2021 16 minutes ago, Triki said: you apparently can't use UDF functions with the AutoitX3lib DLL, only the native functions included in it. Correct and should make sense ..right as you are now running the interpreter AutoIt3.exe, but make internal AutoIt functions available in your program. 18 minutes ago, Triki said: I have done that but I can' t get that puzzle done to convert to c# Then don't use c# but AutoIt3.exe? Seriously, we assume that, when you use another programming languages, you are able to program any user functions yourself. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Triki Posted March 25, 2021 Author Share Posted March 25, 2021 26 minutes ago, Jos said: Correct and should make sense ..right as you are now running the interpreter AutoIt3.exe, but make internal AutoIt functions available in your program. Then don't use c# but AutoIt3.exe? Seriously, we assume that, when you use another programming languages, you are able to program any user functions yourself. Thanks Jos but with that answer I can't do much. 😉 I use Autoit to perform certain functions that c# can' t. I suppose the same is true the other way around. Furthermore, I am not a professional programmer in the sense of writing programs myself. So this is agony for me and if someone like Nine can help me, then I' m very grateful because it will save me hours, days of searching. Link to comment Share on other sites More sharing options...
Nine Posted March 25, 2021 Share Posted March 25, 2021 @Triki Unfortunately, I do not have C#. I did have programmed in C# in the far past, but I do not intend to restart doing so now. Sorry. If you need further help in AutoIt, I will be glad to give a hand. Triki 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Developers Jos Posted March 25, 2021 Developers Share Posted March 25, 2021 (edited) 9 minutes ago, Triki said: Thanks Jos but with that answer I can't do much. 😉 Understand.... 9 minutes ago, Triki said: Furthermore, I am not a professional programmer in the sense of writing programs myself. Hence my comments. ... and I honestly believe you should do the effort of learning and not ask c# questions in our AutoIt3 forum, or else hire a professional programmer. This is an AutoIt3 scripting forum, and yes, we do not mind questions about the AutoIt3x module, but that is something different than asking us to code the C# for you. Just my humble opinion, but when others feel they need to do this for you than by all means.... Edited March 25, 2021 by Jos Triki 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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