après de longues recherches, j'ai trouvé ceci pour masquer une icône de la zone de notification :
Code : Tout sélectionner
#Include <GuiToolBar.au3>
HotKeySet("{ESC}", "_Quit")
Opt("WinTitleMatchMode", 4)
Global $hTray = WinGetHandle("[CLASS:Shell_TrayWnd]")
Global $hToolbar = ControlGetHandle($hTray, "", "[CLASSNN:ToolbarWindow321]")
Global $iCnt = _GUICtrlToolbar_ButtonCount($hToolbar)
ConsoleWrite("Debug: $iCnt = " & $iCnt & @LF)
Global $iCmdVolume = -1
Global $sMsg, $sText, $iCmd
Global $bolVisible = True
For $n = 0 To $iCnt - 1
$sMsg = "Index: " & $n
$iCmd = _GUICtrlToolbar_IndexToCommand($hToolbar, $n)
$sMsg &= " CommandID: " & $iCmd
$sText = _GUICtrlToolbar_GetButtonText($hToolbar, $iCmd)
If StringInStr($sText, "Nom du programme") Then $iCmdVolume = $iCmd
$sMsg &= " Text: " & $sText
ConsoleWrite("Debug: " & $sMsg & @LF)
Next
ConsoleWrite("Debug: $iCmdVolume = " & $iCmdVolume & @LF)
While 1
$bolVisible = Not $bolVisible
If $bolVisible Then
_GUICtrlToolbar_SetButtonState($hToolbar, $iCmdVolume, $TBSTATE_ENABLED)
Else
_GUICtrlToolbar_SetButtonState($hToolbar, $iCmdVolume, $TBSTATE_HIDDEN)
EndIf
Sleep(1000)
WEnd
Func _Quit()
_GUICtrlToolbar_SetButtonState($hToolbar, $iCmdVolume, $TBSTATE_ENABLED)
Exit
EndFuncMerci d'avance.

