Skip to content

Instantly share code, notes, and snippets.

@JustSuperHuman
Created November 8, 2024 21:29
Show Gist options
  • Save JustSuperHuman/f29190c16f02fb6a67a2d7c74f18ba06 to your computer and use it in GitHub Desktop.
Save JustSuperHuman/f29190c16f02fb6a67a2d7c74f18ba06 to your computer and use it in GitHub Desktop.
^+g:: ; CTRL+SHIFT+G hotkey
{
ChatGPTWinTitle := "ChatGPT"
; Check if a window with the title "ChatGPT" exists
if WinExist(ChatGPTWinTitle)
{
; If it exists, bring it to the foreground and activate it
WinActivate
}
else
{
; If it doesn't exist, run the ChatGPT shortcut
Run, "C:\cmd\ChatGPT.lnk"
}
}
return
^+c:: ; CTRL+SHIFT+C hotkey
{
ClaudeWinTitle := "Claude"
; Check if a window with the title "Claude" exists
if WinExist(ClaudeWinTitle)
{
; If it exists, bring it to the foreground and activate it
WinActivate
}
else
{
; If it doesn't exist, run the Claude shortcut
Run, "C:\cmd\Claude.lnk"
}
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment