Code: Select all
PauseOnTarget() {
for i, v in Array("State of Decay 2", "ApplicationFrameHost.exe", "program3.exe") {
;~ if(WinActive("ahk_exe " . v)) {
if(WinActive(v)) {
Suspend, On
return
}
}
Suspend, Off
}
I need to find a way to make it only work on exact title instead of it working on every title that contains one of these titles.
for example, make it only work on "State of Decay 2" instead of "State of Decay 2 - YouTube"