Page 1 of 1

Press a key for x ms ?

Posted: 26 Aug 2014, 10:46
by -FaLcOn-
Hello everybody!

I made a script for a flash game, but i'm stuck for something!

I would like this:
When i press the "A" key, the script press the left key for x ms
I know how to invert the keys but how to put a delay?

Excuse my french, i am. :D

Cordially

Re: Press a key for x ms ?

Posted: 26 Aug 2014, 11:31
by Nextron
Are you trying to remap the arrow keys to WASD?

Anyway, I'm not sure what you want, but here are some things you might want to read up on: SetKeyDelay, Sleep, KeyWait and HotKeys (the UP part).

Re: Press a key for x ms ?

Posted: 26 Aug 2014, 11:48
by -FaLcOn-
If i press "A", it does the left arrow for 100ms (for exemple)

Re: Press a key for x ms ?

Posted: 29 Aug 2014, 21:01
by -FaLcOn-
Could you guys help me for this? I'm a little bit lost

Re: Press a key for x ms ?

Posted: 30 Aug 2014, 20:25
by Zelio
Many ways, maybe you want an autofire...
http://www.autohotkey.com/board/topic/6 ... re-thread/