Code: Select all
#SingleInstance Force
SetCapsLockState, Off
Loop
{
FileReadLine, line, Game.txt, %A_Index%
MsgBox, Active "%line%"
IfWinActive, "ahk_exe %line%"
{
loop
{
WinWait, % winTitle := "ahk_exe %line%"
MsgBox, High Active
Run, C:\Windows\System32\Powercfg.exe /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
WinWaitClose
MsgBox, Balance Active
Run, C:\Windows\System32\Powercfg.exe /setactive 381b4222-f694-41f0-9685-ff5bb260df2e
Break
}
#If WinExist(winTitle)
; Disable Alt+Tab
!Tab::Return
; Disable Left Windows Key
LWin::Return
; CapsLock
CapsLock::Return
#If
}
}