Im a wiki warrior, if you find an error, redundancy, or inefficiency, please let me know.
This code checks for the game Rainbow Six to have Closed every 10 seconds. If game closes, it sends "Pause" key, found in all AHK files that I want to close when the game closes.
Code: Select all
#Persistent
If ProcessExist("RainbowSix.exe")
{
Sleep 10000
}
Else
{
Send, Pause
Suspend,Off
ExitApp
}
ProcessExist(Name){
Process,Exist,%Name%
return Errorlevel
}
~F2::Suspend
return
~Pause::
Suspend,Off
ExitApp
Code: Select all
#Persistent
~RButton & 6::Return
~RButton & 5::Return
7::6
Return
~F3::Suspend
return
~Pause::
Suspend,Off
ExitApp
Code: Select all
Start "" "C:\Users\dower\Desktop\DESKTOP GAMES\Tom Clancy's Rainbow Six Siege.url"
Start "" "C:\Users\dower\Desktop\AutoScript\r6.ahk"
Start "" "C:\Users\dower\Desktop\AutoScript\r6 continuom.ahk"
Start "" "C:\Program Files\LGHUB\lghub.exe"