Skip to content

Instantly share code, notes, and snippets.

@hsab
Created September 2, 2018 21:59
Show Gist options
  • Save hsab/205312bf4f4e13ac44bfda4422ff4adb to your computer and use it in GitHub Desktop.
Save hsab/205312bf4f4e13ac44bfda4422ff4adb to your computer and use it in GitHub Desktop.
Run a program with a keyboard shortcut with AutoHotKey
; This is a simple and pretty generic example of an AutoHotkey script to run a
; program when you press a keyboard shortcut. Add as many of these as you want
; to a .ahk file, and set that to be run at startup.
; See the Hotkeys reference [1] for details of the modifiers and keys available.
; [1]: http://www.autohotkey.com/docs/Hotkeys.htm
; Win+Alt+G - Open Gmail in Chrome
#!g::
Run "C:\Program Files\Google\Chrome\Application\chrome.exe" --app="https://mail.google.com/mail/"
Return
; Win+Shift+Break - Edit this file
#+Break::
Run "c:\Program Files\Vim\vim73\gvim.exe" "d:\AutoHotkey.ahk"
Return
@TimucinPusat
Copy link

thank you a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment