Jump to content
Sign in to follow this  
Doug

Can AutoIT detect a keypress or mouseclick?

Recommended Posts

Doug

I want my script to idle until it detects a particular keystroke or mouse click...is there a command function that I can use for this? I didn't see anything that might be relevant in the function and command lists in the Help file. I'm looking for something similar to WinWait, but for the keyboard or mouse.

Thanks!

Share this post


Link to post
Share on other sites
Blue_Drache

I want my script to idle until it detects a particular keystroke or mouse click...is there a command function that I can use for this?  I didn't see anything that might be relevant in the function and command lists in the Help file.  I'm looking for something similar to WinWait, but for the keyboard or mouse.

Thanks!

<{POST_SNAPBACK}>

Search forum for "_ispressed"

Or just click the provided link and it will bring up the search for you.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites
w0uter

Func _IsPressed($hexKey)
    $hexKey = DllCall("user32", "int", "GetAsyncKeyState", "int", '0x' & $hexKey)
    If Not @error And BitAND($hexKey[0], 0x8000) = 0x8000 Then Return 1
    Return 0
EndFunc  ;==>_IsPressed


My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

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  

×