Для работы переведите игру в оконный режим.
Code: Select all
SetBatchLines, -1
#SingleInstance Force
Loop
{
Sleep, 1000
IfWinActive, ahk_exe crossfire_x64.exe
WinSet, AlwaysOnTop, On,ahk_exe crossfire_x64.exe
IfWinNotActive, ahk_exe crossfire_x64.exe
WinSet, AlwaysOnTop, Off,ahk_exe crossfire_x64.exe
WinGetPos,,,ActiveWidth,,ahk_exe crossfire_x64.exe
If ActiveWidth > 1200
{
WinSet, Style, -0xC00000, ahk_exe crossfire_x64.exe
WinMove,ahk_exe crossfire_x64.exe,,0,0,A_ScreenWidth,A_ScreenHeight
}
}
return
*~$End::ExitApp