I'm not sure when this changed but I had installed the latest version of AHK (1.1.33.05) and none of the joystick hotkey bindings would work
https://www.autohotkey.com/docs/misc/RemapJoystick.htm. The Joystick Test script as well as Using a Joystick as a Mouse script on those pages worked fine with the exception of not being able to click when using the triggers.
I reverted back to when I remember it working (1.1.27.06) and it worked perfectly. This was confirmed on 2 different OS installs. I'm not sure what version caused the issue between then. Something as simple as
would work on the old version, but not the new.