Skip to content

Instantly share code, notes, and snippets.

@neontuna
Last active May 17, 2017 19:19
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 neontuna/5dcc9eb8acd1593395f31bb6d8e5404d to your computer and use it in GitHub Desktop.
Save neontuna/5dcc9eb8acd1593395f31bb6d8e5404d to your computer and use it in GitHub Desktop.
AutoHotkey volume, mute, microphone mute
; Turn master volume up and down with Ctrl-Alt-Up/Down
; Toggle mute with Ctrl-Alt-S
^!Up::Send {Volume_Up}
^!Down::Send {Volume_Down}
^!s::Send {Volume_Mute}
; Toggle Mic mute with Ctrl-Alt-A
; Uses the name of the device as it appears in device manager (Blue Snowball in this case)
; Plays default Windows mute and unmute sounds
^!a::
device := VA_GetDevice("Blue Snowball")
mute := VA_GetMute(1, device)
if( mute = 0 ) {
SoundPlay, %A_WinDir%\Media\mute.wav, WAIT
VA_SetMute(true, , device)
} else {
SoundPlay, %A_WinDir%\Media\unmute.wav, WAIT
VA_SetMute(false, , device)
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment