Joystick scripts only work if I "Open" the script. Why?

Ask gaming related questions (AHK v1.1 and older)
jgwtt
Posts: 1
Joined: 26 Jan 2019, 10:32

Joystick scripts only work if I "Open" the script. Why?

26 Jan 2019, 10:45

I am trying to set up my gamepad to control Bluestacks Android gaming controls. In order to do that, I want to map joystick/gamepad JoyX/JoyY to something like WASD. I've tried to run https://autohotkey.com/docs/scripts/JoystickMouse.htm and https://autohotkey.com/docs/misc/RemapJoystick.htm#axis and they both ONLY work within the AutoHotkey window which pops up when I right click on the script name in the toolbar and select "Open". If I bring any other application to the front, they seemingly stop working. Is there anything I can do to make those scripts to work all the time in all apps?
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Joystick scripts only work if I "Open" the script. Why?

28 Jan 2019, 05:45

This is due to a change MS made with a recent-ish Windows 10 release.
Xbox One pads are no longer readable via the WinMM API (The VERY old API that AHK uses to read sticks) when the AHK script is not the active application.
You must use the XInput API to read them: https://autohotkey.com/board/topic/35848-xinput-xbox-360-controller-api/

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 38 guests