Nilt icon

Elite Dangerous AltTab

Nilt | PRO | 12/02/20 08:26:21 AM UTC (Edited) | 0 ⭐ | 13572 👁️ | Never ⏰ | []
Autohotkey |

1.25 KB

|

None

|

0 👍

/

0 👎

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
;#Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
 
;This script will activate your game window whenever
;any joystick axis changes. Handy for when you're
;Alt-Tabbed out of the game on your second monitor.
 
SetFormat, float, 03 ;remove decimals from joystick values
 
Loop
{
   if WinExist("ahk_exe EliteDangerous64.exe")
   {
      IfWinNotActive
      {   
         Loop
         {
 
            ;get axis values         
            GetKeyState, joyY, 1JoyY
            GetKeyState, joyX, 1JoyX
 
            ;if any axis changes, activate game window
            ;joystick 'rests' at 50
 
            if joyX not between 40 and 60
            {
               WinActivate
               break
            }
            if joyY not between 40 and 60
            {
               WinActivate
               break
            }
            if !WinExist("ahk_exe EliteDangerous64.exe")
            {
               break
            }
 
         }               
      }
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎