Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AutoHotkey | Toggle microphone hotkey script (Windows+U)
;
; AutoHotkey Version: v1.1.22.06
; Language: English
; Platform: Windows 10
; Author: Andre Terra <github.com/airstrike>
;
; Script Function:
; Toggle Microphone Mute -- assumes it is located at WAVE:1, device #2
; Use the SoundCardAnalysis to figure out where your mic is
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
MuteMic() {
local MM
SoundSet, +1, WAVE:1, MUTE, 2
SoundGet, MM, WAVE:1, MUTE, 2
#Persistent
ToolTip, % (MM == "On" ? "Microphone muted" : "Microphone online")
SetTimer, RemoveMuteMicTooltip, 700
return
}
RemoveMuteMicTooltip:
SetTimer, RemoveMuteMicTooltip, Off
ToolTip
return
#u::MuteMic()
@Hassanut

This comment has been minimized.

Copy link

Hassanut commented Feb 6, 2019

Hello! I'm a bit new to coding. This script works great and is the best I could find, thanks. But the same issue persists as with all the other scripts. This only mutes sound coming from my PC (Spotify) and does not mute the sound going into it (my voice). I'm not sure if this was because of the "WAVE::1" part of the script as i'm not sure what to change it to :/ but idk. I'll attach a screenshot of the script and the soundcard information. I'd appreciate any help and insight help a whole lot ^_^

P.S The Master 3 at 79 settings is what i'm trying to get a toggle mute function on and i'm on windows 10.

2019-02-06 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.