Alexxander Posted September 14, 2013 Posted September 14, 2013 hi all i'am using hotkeyset("a", "a") in my script it is working well when i press "a" but the problem is when i press shift + a or ctrl + a or any two keys with "a" it will not work i want my function to run even if i pressed "a" with other key i tried HotKeySet("{LSHIFT}a")for example.. but the problem is this only works if shift + a are presses at the same second it won't work if i pressed shift the i waited 1 second the i presses "a" then i released shift any ideas ?
Solution DW1 Posted September 14, 2013 Solution Posted September 14, 2013 Sounds like _IsPressed() would work better for what you need #include <Misc.au3> ;~ HotKeySet('a', 'a') Global $i = 0 While 1 If _IsPressed(41) Then a() Sleep(10) WEnd Func a() $i += 1 ConsoleWrite('a' & $i & @CRLF) While _IsPressed(41) Sleep(10) WEnd EndFunc ;==>a Alexxander 1 AutoIt3 Online Help
Alexxander Posted September 14, 2013 Author Posted September 14, 2013 danwilli thanks bro u r awesome ...
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