Polls the tray to see if any events have occurred.
TrayGetMsg ( )
| 0 | No event |
| Control ID | the ID of the control sending the message |
| $TRAY_EVENT_PRIMARYDOWN | the primary mouse button was pressed |
| $TRAY_EVENT_PRIMARYUP | the primary mouse button was released |
| $TRAY_EVENT_SECONDARYDOWN | the secondary mouse button was pressed |
| $TRAY_EVENT_SECONDARYUP | the secondary mouse button was released |
| $TRAY_EVENT_PRIMARYDOUBLE | the primary mouse button was double pressed |
| $TRAY_EVENT_SECONDARYDOUBLE | the secondary mouse button was double pressed |
#NoTrayIcon
Opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit) will not be shown.
Local $settingsitem = TrayCreateMenu("Settings")
TrayCreateItem("Display", $settingsitem)
TrayCreateItem("Printer", $settingsitem)
TrayCreateItem("")
Local $aboutitem = TrayCreateItem("About")
TrayCreateItem("")
Local $exititem = TrayCreateItem("Exit")
TraySetState()
While 1
Local $msg = TrayGetMsg()
Select
Case $msg = 0
ContinueLoop
Case $msg = $aboutitem
MsgBox(64, "About:", "AutoIt3-Tray-sample")
Case $msg = $exititem
ExitLoop
EndSelect
WEnd
Exit