0
所以我試圖確定進程MultiMC.exe是否正在運行,如果不是,我想結束我的腳本。如何檢測進程或應用程序是否正在運行並終止程序如果它不是
IfExist, Process MultiMC.exe
ExitApp, 0
Else
ExitApp 1
我試過這個,但它不工作。
所以我試圖確定進程MultiMC.exe是否正在運行,如果不是,我想結束我的腳本。如何檢測進程或應用程序是否正在運行並終止程序如果它不是
IfExist, Process MultiMC.exe
ExitApp, 0
Else
ExitApp 1
我試過這個,但它不工作。
嘗試以下操作「過程,存在act.exe」,從http://www.autohotkey.com/board/topic/50026-if-process-not-running-run-it/
解除我只能說明這個,所以你怎麼看「的過程,存在act.exe」在另一個腳本中使用。
#persistent
SetTitleMatchMode,2
Loop
{
Process,Exist, act.exe ; Sets errorlevel to process PID
IfWinNotExist, % "ahk_pid " errorlevel ; Expression for ahk_pid
{ ; Block to do something.
Run, C:\Documents and Settings\Pat\Desktop\act.exe
Break ; Stops loop if run or it will continue forever.
}
}
這可能有所幫助:http://www.autohotkey.com/board/topic/49732-kill-process/ – acdcjunior