maniootek Posted September 24, 2009 Posted September 24, 2009 I can't find in function list something like that: while key("ctrl") is holded ... wend I mean I would do my program to run something only when any key is holded. Is it possible? If it's then please tell me how.
somdcomputerguy Posted September 24, 2009 Posted September 24, 2009 In the Autoit UDF help file, look up _IsPressed. Use that in a While loop. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
DW1 Posted September 24, 2009 Posted September 24, 2009 For example, this would perform the actions in the 2nd while loop if either control key is being held down: #include<misc.au3> While 1 Sleep(10) While _IsPressed('A2') Or _IsPressed('A3') ConsoleWrite("Actions while control is pressed" & @CRLF) Sleep(100) WEnd WEnd AutoIt3 Online Help
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