Skip to content

Autohotkey launch app or switch window

Posted on:July 12, 2024 at 04:06 AM

Keeping the function at the end of the config file is optional but can help resolve conflicts

F9::
    IfWinExist ahk_class Chrome_WidgetWin_1
        winactivate ahk_class Chrome_WidgetWin_1
    else
        run, "C:\Program Files\Google\Chrome\Application\chrome.exe"
    WinWaitActive ahk_class Chrome_WidgetWin_1
return