Here is a link to a great script i stumbled upon for using your Gamepad as a Mouse
https://www.autohotkey.com/docs/scripts/JoystickMouse.htm
Download script and save as an ahk. This script works great for me, i use it as an additional application running before main application for my music player MusicBee and my film player Potplayer and could be used for any application that needs mouse control by making it an additional app. In order to have the ahk close when you press the escape button add this to the end of script, then when you close down your application just press the esc key to close the ahk:-
Escape::
Process,close,AutoHotkey.exe
return
This ahk uses very little resources and if you want it to run when computer starts up just place it into your start folder.