SeanGozlan Posted November 2, 2022 Share Posted November 2, 2022 I am trying to use the Autoit. But first I need to understand the abilities of the tool. The "Autoit v3 Window Information" is grate. But can I send a click with mouse on a class or on class with Instaces for specific area. On the same idea, there is a way to knows the cordenate of the calss and instence so I will able to use the mouse method MouseClick($MOUSE_CLICK_PRIMARY, 0, 500, 2) And there is a way to use : Example() Func Example() ; Run Notepad Run("notepad.exe") ; Wait 10 seconds for the Notepad window to appear. Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) ; Send a mouse click to the edit control of Notepad using the handle returned by WinWait. ControlClick($hWnd, "", "Edit1") ; Wait for 2 seconds. Sleep(2000) ; Close the Notepad window using the handle returned by WinWait. WinClose($hWnd) EndFunc ;==>Example In case I am trying to use ClassnameNN, it doesn't work on specifc buttons. It looks very odd because the tool does find the buttons, so why he cannot send a mouse click on it ? gal9 1 Link to comment Share on other sites More sharing options...
Jfish Posted November 2, 2022 Share Posted November 2, 2022 What application are you trying to automate? Lots of questions in your post but the coordinates within a given control are relative to the control when you use ControlClick (as opposed to MouseClick). ControlClick has optional X,Y parameters that allow for clicking on a specific spot in the control. If you are intending to interact with a WPF control under Windows 10 it may not work with these methods as it may require UI Automation (see below post). Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt 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