Sign in to follow this  
Followers 0
DeadAdm1n

how do i?

5 posts in this topic

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?

Share this post


Link to post
Share on other sites



#3 ·  Posted (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 by DeadAdm1n

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0