If you pass icon handle, will not destroy it. Icons allocated by module will be automatically destroyed when function Your script can create any number of tray icons and receive notifications about user actions on them.Īlso, you can get and modify 3thd party tray icons information.
#INTEL GRAPHICS AND MEDIA CONTROL PANEL PROFILE SHORTCUT WINDOWS#
Using this module you can totally control Windows notification area. Looks like you need the Tray.ahk library, I found documentation here. WinHide, ahk_class #32768 this and next line are to hide the menu.ĬontrolSend,ahk_class #32768 This post seems to have it all figured out. SendMessage, 0x417, A_Index-1, pProc, ToolbarWindow32%idxTB%, ahk_class NotifyIconOverflowWindow TB_GETBUTTONĬontrolGet, hParent, hWnd, TrayNotifyWnd1, ahk_class Shell_TrayWndĬontrolGet, hChild, hWnd, ToolbarWindow321, ahk_id %hParent%ĬontrolGet, hWnd, hWnd, ToolbarWindow32%A_Index%, ahk_class Shell_TrayWnd SendMessage, 0x418, 0, 0, ToolbarWindow32%idxTB%, ahk_class NotifyIconOverflowWindow TB_BUTTONCOUNT WinGet, pidTaskbar, PID, ahk_class NotifyIconOverflowWindow , arr := (A_IsUnicode ? wTooltip : sTooltip)ĭllCall("VirtualFreeEx", "Uint", hProc, "Uint", pProc, "Uint", 0, "Uint", 0x8000)ĭetectHiddenWindows, %Setting_A_DetectHiddenWindows% , Index = arr.MaxIndex()>0 ? arr.MaxIndex()+1 : 1
VarSetCapacity(sTooltip,128), VarSetCapacity(wTooltip,128*2) If !sExeName || (sExeName = sProcess) || (sExeName = pid) WinGet, sProcess, ProcessName, ahk_id %hWnd% SendMessage, 0x417, A_Index-1, pProc, ToolbarWindow32%idxTB%, ahk_class Shell_TrayWnd TB_GETBUTTON SendMessage, 0x418, 0, 0, ToolbarWindow32%idxTB%, ahk_class Shell_TrayWnd TB_BUTTONCOUNT WinGet, pidTaskbar, PID, ahk_class Shell_TrayWnd Setting_A_DetectHiddenWindows := A_DetectHiddenWindows
Tray_Icons := TrayIconsSearch("igfxtray.exe")
Only allow a single instance of the script Make the script work even if the window is hidden