What I'd like to do is set up an AHK script that modifies the behavior of a standard Xbox 360 controller's A button. When pressed and released, it should function normally. When held down, it should repeat at 150 milliseconds between presses until released.
Is this possible? I've been experimenting with a keyboard version of this, which works perfectly in notepad, but doesn't register in the game. Frustratingly, the game will only accept either keyboard or controller input at any given moment, not both. I'd prefer to play with a controller, though I could switch to playing with keyboard/mouse if I can get this script to register in-game. I'd appreciate any suggestions.
Here's what I have for the keyboard, though this doesn't seem to register in-game:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#UseHook
#InstallMouseHook
#InstallKeybdHook
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
$Space::
While GetKeyState("Space","p"){
Send {space}
Sleep 150
}
return