DeadAdm1n Posted July 18, 2010 Share Posted July 18, 2010 i want to click a certain button (ex: "ok") on a program i run on my computer, but i dont want to use the mouseclick function, is there a way? Link to comment Share on other sites More sharing options...
Developers Jos Posted July 18, 2010 Developers Share Posted July 18, 2010 ControlClick() ? 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...
DeadAdm1n Posted July 18, 2010 Author Share Posted July 18, 2010 (edited) ControlClick() ?ya that works, but the problem is the title of the window is set to change, like one time i open it, it will be "skh4a" next time i open it will be "gasd2"maybe tell the autoit to scan for the word "ok" then click it? or something like that... im a noob, i tried the mouseclick function but i tested about 6 times and it moves a little bit every time, so i cant be persistent Edited July 18, 2010 by DeadAdm1n Link to comment Share on other sites More sharing options...
Developers Jos Posted July 18, 2010 Developers Share Posted July 18, 2010 Read up on how to handle windows in the autoit3 helpfile. 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...
soadmania Posted July 18, 2010 Share Posted July 18, 2010 You can use PostMessage API. There s a function i ve made before with PostMessageAPI. Func ClickPoster($x, $y, $hWnd) $long = BitOR(BitShift($x, -16), BitAND($y, 0xFFFF)) DllCall("User32.dll", "int", "PostMessageA", "hwnd", $hWnd, "int", 0x200, "int", 0, "int", $long) DllCall("User32.dll", "int", "PostMessageA", "hwnd", $hWnd, "int", 0x201, "int", 0x1, "int", $long) DllCall("User32.dll", "int", "PostMessageA", "hwnd", $hWnd, "int", 0x202, "int", 0x1, "int", $long) EndFunc 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