^F5:: run, CreateFile.exe WinWaitActive, CreateFile, ,2 if ErrorLevel { MsgBox, WinWaitActive timed out. return } else { send, {Enter} WinClose } return