I wrote a basic script like this ;
Code: Select all
SetKeyDelay, 1000
Joy5::SendInput, 5
Joy4::SendInput, {Up}
Joy12::SendInput, {Down}
return
[Mod edit: Moved topic from AHK v2 help, since this is v1 code.]
Code: Select all
SetKeyDelay, 1000
Joy5::SendInput, 5
Joy4::SendInput, {Up}
Joy12::SendInput, {Down}
return
Change SendInput to Send, the default send mode is event and then SetKeyDelay will work. You will likely want to set the PressDuration parameter of SetKeyDelay also when sending keystrokes to a game. example: SetKeyDelay, 1000, 50Remarks
Remarks
If SetKeyDelay is not used, the default delay is 10 for the traditional SendEvent mode and -1 for SendPlay mode. The default press duration is -1 for both modes.
SetKeyDelay is not obeyed by SendInput; there is no delay between keystrokes in that mode. This same is true for Send when SendMode Input is in effect.
Users browsing this forum: No registered users and 92 guests