Not exactly sure what it does - I was hoping it could be used to "mask" input from a joystick to anything but the AHK script.
Here is my code:
Code: Select all
#SingleInstance, force
DetectHiddenWindows, on
JoyID := 0
ThisScriptsHWND := WinExist("Ahk_PID " DllCall("GetCurrentProcessId"))
f11::
ret := DllCall("joySetCapture", "ptr", ThisScriptsHWND, "uint", JoyID , "uint", 10)
msgbox % 0 + ret
Return
f12::
DllCall("joyReleaseCapture", "UINT", JoyID )
Return