Http /en-us/library/microsoft.directx_gamepad Broken Link for safety Http /en-us/library/microsoft.directx_state Broken Link for safety XInput.dll returns controller state as a binary structure: Http /en-us/library/ms681381.aspx Broken Link for safety If the function fails, ErrorLevel is an error code defined in Winerror.h. If the controller is not connected, ErrorLevel is ERROR_DEVICE_NOT_CONNECTED (1167). ![]() If the function succeeds, ErrorLevel is ERROR_SUCCESS (zero). The current state of the controller as an associative array. UserIndex - Index of the user's controller. ![]() Retrieves the current state of the specified controller. Throw Exception("Failed to initialize XInput: function not found.") If !(_XInput_GetState & _XInput_SetState & _XInput_GetCapabilities) _XInput_GetCapabilities := DllCall("GetProcAddress" ,"ptr",_XInput_hm ,"astr","XInputGetCapabilities" ,"ptr") _XInput_SetState := DllCall("GetProcAddress" ,"ptr",_XInput_hm ,"astr","XInputSetState" ,"ptr") || (_XInput_GetState := DllCall("GetProcAddress" ,"ptr",_XInput_hm ,"astr","XInputGetState" ,"ptr")) Throw Exception("Failed to initialize XInput: " dll " not found.") _XInput_hm := DllCall("LoadLibrary" ,"str",dll ,"ptr") XINPUT_GAMEPAD_RIGHT_STICK_DEADZONE := 8689 XINPUT_GAMEPAD_LEFT_STICK_DEADZONE := 7849 Device subtypes available in XINPUT_CAPABILITIES Device types available in XINPUT_CAPABILITIES Newer versions of XInput may require additional constants. NOTE: These are based on my outdated copy of the DirectX SDK. Initializes XInput.ahk with the given XInput DLL.ĭll - The path or name of the XInput DLL to load. 0x4020 is Back (or View) button + the X button pressed down at the same time 0x2020 is Back (or View) button + the B button pressed down at the same time Put the tooltip.ahk and the xinput.ahk to the same folder and run the tooltip.ahk. It uses Xinput so it support the Wire/Wireless and Bluetooth Xbox controllers too. That's why I made a little Tooltip to test the pressed buttons. If you try to use the official Joystick tester you get nothing info about the pressed buttons. If you prefer live chat with other humans:Īfter the Windows 10 Anniversary Update AHK doesn't support properly the Xbox One Controllers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |