Skip to content

Instantly share code, notes, and snippets.

@cowboy
Created April 17, 2014 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cowboy/10948113 to your computer and use it in GitHub Desktop.
Save cowboy/10948113 to your computer and use it in GitHub Desktop.
AutoHotkey Misc
SoundPlay *64
; =============
; Edit & Reload
; =============
!^+F12::
Edit
Reload
return
; =================
; Volume Adjustment
; =================
nircmd(cmd, beep) {
Run C:\bin\nircmd %cmd%, , Hide
if (beep)
SoundPlay *32
}
; Output Device (Global)
>^+PgUp:: nircmd("setsysvolume 65535", 1) ; 100%
>^+PgDn:: nircmd("mutesysvolume 2", 1) ; Mute
>^PgUp:: nircmd("changesysvolume 6553", 1) ; +10%
>^PgDn:: nircmd("changesysvolume -6553", 1) ; -10%
; Focused App
>^+Home:: nircmd("setappvolume focused 1", 0) ; 100%
>^+End:: nircmd("muteappvolume focused 2", 0) ; Mute
>^Home:: nircmd("changeappvolume focused 0.1", 0) ; +10%
>^End:: nircmd("changeappvolume focused -0.1", 0) ; -10%
; System Sounds
>^+Insert:: nircmd("setappvolume SystemSounds 1", 1) ; 100%
>^+Delete:: nircmd("muteappvolume SystemSounds 2", 1) ; Mute
>^Insert:: nircmd("changeappvolume SystemSounds 0.1", 1) ; +10%
>^Delete:: nircmd("changeappvolume SystemSounds -0.1", 1) ; -10%
@cowboy
Copy link
Author

cowboy commented Apr 17, 2014

In case you're unsure about what all the >!^+ do, they're modifiers like Right Alt, Ctrl, Shift, etc. See the AutoHotkey Hotkeys documentation for all the things.

Also, I've installed the amazingly useful NirCmd utility into C:\bin\ for the purposes of this script, check it out. It's amazingly useful.

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