fastkeys 运行本地exe程序脚本 运行后再次打开激活程序,当前激活状态最小化

fastkeys 运行本地exe程序脚本 运行后再次打开激活程序,当前激活状态最小化
记得左上角选 command

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, A
    if (pid = activePID) {
        WinMinimize, ahk_exe %targetExe%
    } else {
        WinActivate, ahk_exe %targetExe%
    }
}

posted @ 2024-11-15 16:43  彭成刚  阅读(4)  评论(0编辑  收藏  举报