Sign in to follow this  
Followers 0
awp123

How can i press keyboard any key ?

4 posts in this topic

#1 ·  Posted (edited)

How can i press keyboard any key ?

HotKeySet ("g") is it true ?

First time , i am using autoit, and i don't know c++ , i am noob, sory it :)

#include <ImageSearch.au3>

HotKeySet("{ESC}", "Terminate")
$x = 0
$y = 0
While 1
$res1 = _imagesearch('u.png',0, $x, $y, 0)
If $res1 = 1 Then
MouseMove($x, $y,10)
HotKeySet ("g")
EndIf
WEnd
Func Terminate()
Exit 0
EndFunc
Edited by awp123

Share this post


Link to post
Share on other sites



HotKeySet receives a keypress.

I beleive you want to send a keypress.

SEND sends keys to the active window.

CONTROLSEND sends keys to a specific control of a window.

Share this post


Link to post
Share on other sites

ControlGetPos will return the position & size of the control (x,y,width and height)

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