Thanks, this is very useful. I made a few tweaks to add the following functions:
Support for the guide button (the one in the center of the xbox 360 controller)
Created function to turn off the controller
Created function to check if a controller is connected or not
_XInput.au3