Skip to content

Instantly share code, notes, and snippets.

@entropie
Last active January 12, 2021 20:52
Show Gist options
  • Save entropie/bbc0ff126913e0b1eeb34ff892aa874e to your computer and use it in GitHub Desktop.
Save entropie/bbc0ff126913e0b1eeb34ff892aa874e to your computer and use it in GitHub Desktop.
#m::
Input, char, L1 T0.5 ;wait for 1 character, for 0.5 seconds and stores it in char
if (ErrorLevel = "TimeOut") ;time limit exceeded
return
if (char = "n")
Send, {Media_Next}
else if (char = "q") {
;Run C:\Program Files\nircmd.exe mutesysvolume 2 "2- USB Audio CODEC"
Run C:\Program Files\SoundVolumeView.exe /Switch "mmic"
SoundGet, status, MASTER:1, MUTE, 4
if (status = "Off")
Run C:\Program Files\nircmd.exe speak text "muted"
else
Run C:\Program Files\nircmd.exe speak text "blabla"
} else if (char = "p")
Send, {Media_Prev}
else if (char = " ")
Send, {Media_Play_Pause}
else
send %char%
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment