diff --git a/scripts/Windows/Software/TobiiGameHub/GameHub.ahk b/scripts/Windows/Software/TobiiGameHub/GameHub.ahk index 5b05c43f..7783b37e 100644 --- a/scripts/Windows/Software/TobiiGameHub/GameHub.ahk +++ b/scripts/Windows/Software/TobiiGameHub/GameHub.ahk @@ -1,19 +1,19 @@ InstallGameHub() { - SetTitleMatchMode, RegEx + SetTitleMatchMode("RegEx") windowTitle := "^Tobii Game Hub$" - Run, "setup.exe" - WinWait % windowTitle,, 60 - WinActivate % windowTitle - MouseClick, Left, 485, 365 - MouseClick, Left, 600, 455 - MouseClick, Left, 533, 623 - MouseClick, Left, 936, 662 - Sleep, 10 * 1000 - WinActivate % windowTitle - WinGet, pid, PID - Run, pwsh -c "Stop-Process -Force %pid%" + Run("setup.exe") + WinWait(windowTitle, unset, 60) + WinActivate(windowTitle) + MouseClick("Left", 485, 365) + MouseClick("Left", 600, 455) + MouseClick("Left", 533, 623) + MouseClick("Left", 936, 662) + Sleep(10 * 1000) + WinActivate(windowTitle) + pid := WinGetPID() + Run("pwsh -c Stop-Process -Force ".pid) } InstallGameHub() diff --git a/scripts/Windows/Software/TobiiGhost/Ghost.ahk b/scripts/Windows/Software/TobiiGhost/Ghost.ahk index c26a99a7..febcc749 100644 --- a/scripts/Windows/Software/TobiiGhost/Ghost.ahk +++ b/scripts/Windows/Software/TobiiGhost/Ghost.ahk @@ -1,18 +1,18 @@ InstallGhost() { - SetTitleMatchMode, RegEx + SetTitleMatchMode("RegEx") windowTitle := "^Tobii Ghost$" - Run, "setup.exe" - WinWait % windowTitle,, 60 - WinActivate % windowTitle - MouseClick, Left, 44, 694 - MouseClick, Left, 330, 752 - WinWaitNotActive - WinWait % windowTitle,, 20 - MouseClick, Left, 563, 397 - MouseClick, Left, 650, 497 - Sleep, 10 * 1000 + Run("setup.exe") + WinWait(windowTitle, unset, 60) + WinActivate(windowTitle) + MouseClick("Left", 44, 694) + MouseClick("Left", 330, 752) + WinWaitNotActive() + WinWait(windowTitle, unset, 20) + MouseClick("Left", 563, 397) + MouseClick("Left", 650, 497) + Sleep(10 * 1000) } InstallGhost()