hides the microphone privacy icon on Windows 11

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
haomingchen1998
Posts: 162
Joined: 20 Feb 2023, 16:37

hides the microphone privacy icon on Windows 11

Post by haomingchen1998 » 29 May 2023, 16:11

I'm trying to write an Autohotkey script that hides the microphone privacy icon on Windows 11 using "[LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit".
The library I'm referring to is from viewtopic.php?f=6&t=1229&start=20

I need to find the "idCmd - Command identifier associated with the button”, I'm unsure how to find that, and after I find that, do I just replace all the idCmd with that identifier? Any help will be appreciated, thanks!

Code: Select all

TrayIcon_Hide(idCmd, sTray:="Shell_TrayWnd", bHide:=True)
{
    d := A_DetectHiddenWindows
    DetectHiddenWindows, On
    idxTB := TrayIcon_GetTrayBar()
    SendMessage, 0x0404, idCmd, bHide, ToolbarWindow32%idxTB%, ahk_class %sTray% ; TB_HIDEBUTTON
    SendMessage, 0x001A, 0, 0, , ahk_class %sTray%
    DetectHiddenWindows, %d%
}

Return to “Ask for Help (v1)”