The below script was designed to print the X value of the stick to a message box, however no matter the stick position, it returns "49.999237".
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Sleep 500
GetKeyState, JoyA, 2JoyX
MsgBox, %JoyA%
However, when the official joystick test script (https://autohotkey.com/docs/scripts/JoystickTest.htm) is used to test the output of joystick 2 , the joystick is detected perfectly. As far as I can see, there is no functional difference between the two scripts. This has been tested with multiple joysticks of the same type, and the same result always ensues.
Any help would be greatly appreciated.
Extra info:
The Joystick is a logitech extreme 3D pro. I am using Windows 7 64 bit. Windows detects the joystick correctly in it's calibration utility.