Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Persistent
- SetTimer, WatchAxis, 100
- return
- WatchAxis:
- ;Get the axis input for all 6 controllers then floors those outputs into their own vars.
- Loop 6
- {
- GetKeyState, XAxis, %A_Index%JoyX
- GetKeyState, YAxis, %A_Index%JoyY
- GetKeyState, ZAxis, %A_Index%JoyZ
- %A_Index%XAxis := Floor(XAxis)
- %A_Index%YAxis := Floor(YAxis)
- %A_Index%ZAxis := Floor(ZAxis)
- }
- Loop 6
- {
- ;Compares the last run of input to the current inputs and activates the window
- if (%A_Index%XAxis - %A_Index%XAxisPrev > 10 || %A_Index%XAxis - %A_Index%XAxisPrev < -10) or (%A_Index%YAxis - %A_Index%YAxisPrev > 10 || %A_Index%YAxis - %A_Index%YAxisPrev < -10) or (%A_Index%ZAxis - %A_Index%ZAxisPrev > 10 || %A_Index%ZAxis - %A_Index%ZAxisPrev < -10)
- {
- IfWinExist, Elite - Dangerous (CLIENT)
- {
- %A_Index%XAxisPrev := %A_Index%XAxis
- %A_Index%YAxisPrev := %A_Index%YAxis
- %A_Index%ZAxisPrev := %A_Index%ZAxis
- WinActivate
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement