maniootek Posted September 24, 2009 Share 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. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted September 24, 2009 Share 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. Link to comment Share on other sites More sharing options...
DW1 Posted September 24, 2009 Share 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 Link to comment Share on other sites More sharing options...
maniootek Posted September 24, 2009 Author Share Posted September 24, 2009 Thank you very much. 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