Run, %A_WinDir%\notepad.exe
Process, WaitClose, notepad.exe
MsgBox, Notepad 已关闭,继续执行脚本!

运行逻辑
Run:启动记事本程序。
Process, WaitClose:检测 notepad.exe 进程,直到其关闭。
MsgBox:在目标程序关闭后弹出提示框,确认流程结束。

转载请注明出处