Booo Posted May 25, 2014 Share Posted May 25, 2014 what problem ? HotKeySet("{W}", "startBind") HotKeySet("{E}", "STOPBind") Func startBind() Send("{a down}") EndFunc Func STOPBind() Send("{a up}") EndFunc Link to comment Share on other sites More sharing options...
Jfish Posted May 25, 2014 Share Posted May 25, 2014 Is this what you are trying to do? HotKeySet("{w}", "startBind") HotKeySet("{e}", "STOPBind") $loop = false Func startBind() $loop = true while $loop= true Send("{a down}") WEnd EndFunc Func STOPBind() $loop = false Send("{a up}") EndFunc while 1 WEnd Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
jguinch Posted May 25, 2014 Share Posted May 25, 2014 What is "{W}" ? Try with just "w" instead Booo 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Jfish Posted May 25, 2014 Share Posted May 25, 2014 @jguinch - I ran the code with and without the captalized w. I would have expected it to keep sending an "a" as in "aaaaaaaaaaaaaaaaaaaaaaa" until you press "e". It did not. It only sent one "A" when "w" was pressed. The code I posted simulates what I think he wants to happen but I confess I don't understand why the down key does not work that way (or maybe I don't understand how it is supposed to work). Booo 1 Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
Booo Posted May 26, 2014 Author Share Posted May 26, 2014 Is this what you are trying to do? HotKeySet("{w}", "startBind") HotKeySet("{e}", "STOPBind") $loop = false Func startBind() $loop = true while $loop= true Send("{a down}") WEnd EndFunc Func STOPBind() $loop = false Send("{a up}") EndFunc while 1 WEnd thank u bro Link to comment Share on other sites More sharing options...
Booo Posted May 26, 2014 Author Share Posted May 26, 2014 What is "{W}" ? Try with just "w" instead not aork aith "w" @jguinch - I ran the code with and without the captalized w. I would have expected it to keep sending an "a" as in "aaaaaaaaaaaaaaaaaaaaaaa" until you press "e". It did not. It only sent one "A" when "w" was pressed. The code I posted simulates what I think he wants to happen but I confess I don't understand why the down key does not work that way (or maybe I don't understand how it is supposed to work). +1 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