-
-
Save pa-0/892e46ec869f531f1a4458faa51a3162 to your computer and use it in GitHub Desktop.
AutoHotkey | Toggle microphone hotkey script (Windows+U)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; | |
| ; AutoHotkey Version: v1.1.22.06 | |
| ; Language: English | |
| ; Platform: Windows 10 | |
| ; Author: Andy Terra <github.com/airstrike> | |
| ; | |
| ; Script Function: | |
| ; Toggle Microphone Mute -- assumes it is located at WAVE:1, device #2 | |
| ; Use the SoundCardAnalysis script to figure out where your mic is | |
| ; https://www.autohotkey.com/docs/commands/SoundSet.htm#Ex | |
| ; | |
| #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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment