I use [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit to hide a specific tray icon. It works file with Shell_TrayWn. But it doesn't work if the icon is hidden in the NotifyIconOverflowWindow area. Below is my code:
Code: Select all
; #NoTrayIcon
#Include TrayIcon.ahk
test := TrayIcon_GetInfo(sExeName := "FamItrfc.exe")
Loop, % test.MaxIndex()
str .= test[A_Index].IDcmd
TrayIcon_Hide(str, sTray:="NotifyIconOverflowWindow", bHide:=True)
; TrayIcon_Hide(str, sTray:="Shell_TrayWnd", bHide:=True) ==> this works file if the icon is not hidden