这可能看起来没有必要,但我想在 ahk 关闭后重新打开一个特定的程序

It maybe seem unnecessary, but I want to reopen a spezific program after it is closed by ahk

这是我得到的结果:

#IfWinActive ahk_exe zotero.exe
f7::
WinGetTitle, Title, A
WinClose, A
Sleep 1000
IfWinNotExist(zotero)
{
Run,  zotero.exe , , Min
}
Return

我不确定 if 语句中的 if 语句。我怎样才能让它发挥作用?

我建议使用:

Loop {
    Sleep, 1000 ; just 1 second delay between any check
    process, Exist, "Zotero.exe"
    if ErrorLevel
        Run,  zotero.exe , , Min
}