ji7saw Posted July 9, 2018 Posted July 9, 2018 hi, I want a simple script that holding two buttons ('W' 'D').
AutoBert Posted July 9, 2018 Posted July 9, 2018 (edited) First step is done, you know what you want. Next step read in helpfile and after just do it. Edited July 9, 2018 by AutoBert ji7saw 1
ji7saw Posted July 9, 2018 Author Posted July 9, 2018 for now I have something like: #z:: SEND w send d Return z Up:: SEND w send d Return but when I click "z" it clicks' w 'd' only once. How to make it loop?
FrancescoDiMuro Posted July 9, 2018 Posted July 9, 2018 @ji7saw Hi and welcome to the AutoIt forum Since you are new, I higly reccomend to you to read Forum Rules and Forum Etiquette, in which it is clearely stated: Quote Usually asking for a script is not taken too well, within reason. Keep in mind that this is a support forum, so please acknowledge that. We are here to help you with your scripts, not to spoon-feed code to you. Then, for what purpose are you sending those keys? Thanks. Best Regards. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
HardXOR Posted July 9, 2018 Posted July 9, 2018 try this Send("{W down}", 0) Send("{D down}", 0) ... do your stuff ... Send("{W up}", 0) Send("{D up}", 0) with _IsPressed you can check if key is down or up #include <Misc.au3> $hDLL = DllOpen("user32.dll") Send("{W down}", 0) Sleep(1000) ConsoleWrite("key pressed " & _IsPressed(Hex(Asc("W")), $hDLL) & @CRLF) Sleep(1000) Send("{W up}", 0) Sleep(1000) ConsoleWrite("key pressed " & _IsPressed(Hex(Asc("W")), $hDLL) & @CRLF) DllClose($hDLL)
Developers Jos Posted July 9, 2018 Developers Posted July 9, 2018 2 hours ago, ji7saw said: for now I have something like: ... and you are sure you are at the right forum? Doubt it! Jos Moonscarlet 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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