【发布时间】:2017-09-07 08:10:20
【问题描述】:
我的脚本一直运行到 while 循环存在的地步。 ScummVM 正确启动。
但是,我希望脚本在检测到 scummvm.exe 已关闭时继续运行并执行命令。每次我关闭 scummvm 时,什么都没有发生。
#NoTrayIcon
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
RunWait, "..\sc55 scummvm.exe"
Run, ".\scummvm.exe" "--no-console" "--config=.\scummvm.ini" "samnmax"
Process, Exist, scummvm.exe ;wait until scummvm.exe is found before continuing
ScummVM = %ErrorLevel% ; Save the value immediately since ErrorLevel is often changed.
while ScummVM != 0 ;while scummvm is running i.e., error level is not equal to 0
{} ;"do nothing"
msgbox "scummvm has closed" ;action taken when scummvm is closed
return
【问题讨论】:
标签: autohotkey