; ; Turn script into wrapper for a program ; CheckWinExist(Window) { if !WinExist(Window) { ExitApp } } Run %WrapperPath% SetTitleMatchMode 3 WinWait %WrapperWindow%,,600 ; Check if window exists once per second WrapperFunc := Func("CheckWinExist").bind(WrapperWindow) SetTimer, %WrapperFunc%, 1000