fastkeys 运行本地exe程序脚本 运行后再次打开激活程序,当前激活状态最小化
programPath := "C:\Program Files (x86)\vym\vym.exe"
targetExe := "vym.exe"
programArgs := "C:\Users\Reciter\Desktop\vymz1\home.vym"
if (WinExist("ahk_exe " . targetExe) = 0) {Run, %programPath% %programArgs%
} else {WinGet, pid, PID, ahk_exe %targetExe%WinGet, activePID, PID, Aif (pid = activePID) {WinMinimize, ahk_exe %targetExe%} else {WinActivate, ahk_exe %targetExe%}
}