 ;-------------------------------------------------------
 
 ;-------------------------------------------------------
+; Toggle main microphone mute
+; Here, 10 is the ID of my microphone.
+;-------------------------------------------------------
+ShowMicrophoneOSD(CustomText)	
+{
+    SetTimer, HideMicrophoneOSD, 500 ; Hide after specified delay
+    GuiControl, MicrophoneGui:Text, OSDMicrophoneTextValue, %CustomText% ; Set text
+    Gui, MicrophoneGui:Show, x1325 y900 NoActivate ; NoActivate avoids deactivating the currently active window.
+    return
+}
+
+HideMicrophoneOSD()
+{
+    Gui, MicrophoneGui:Hide,
+}
+
+Pause::
+    SoundSet, +1, MASTER, mute, 10
+    SoundGet, microphone_mute , , mute, 10
+    ; -Var := "Microphone MUTE is " . microphone_mute
+    if (microphone_mute = "ON")
+    {
+        showMicrophoneOSD("Microphone MUTED")
+    } else {
+        showMicrophoneOSD("Microphone ON AIR")
+    }
+    SetTimer, HideMicrophoneOSD, -2000
+return
+
+RemoveToolTip:
+    ToolTip
+return
+;-------------------------------------------------------
+
+;-------------------------------------------------------
 ; Adjust volume by scrolling the mouse wheel over the taskbar
 ;-------------------------------------------------------
 MouseIsOver(WinTitle) {

;-------------------------------------------------------
; OSD for volume
;-------------------------------------------------------
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow  ; +ToolWindow avoids a taskbar button and an alt-tab menu item.
Gui, Color, FFD54F  ; Set background color
Gui, Font, s32 w600, Arial  ; Set a large font size (32-point).
Gui, Font,, Ubuntu Condensed  ; Preferred font.
Gui, Add, Text, vOSDTextValue +Center, UNMUTE
;-------------------------------------------------------

;;*******************************************************

SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
SetTitleMatchMode 2 ; A window's title can contain WinTitle anywhere inside it to be a match. 

;*******************************************************
; SETUP
;*******************************************************

