From the example above.... If you run the following code you will notice it beeps every 3 seconds, but the menus items (cases) no longer work when you click them...is it possible to have the following script beep every 3 seconds and the menu items still function....thats what I'm trying to do...
#NoTrayIcon
#include <MsgBoxConstants.au3>
#include <TrayConstants.au3> ; Required for the $TRAY_ICONSTATE_SHOW constant.
Opt("TrayMenuMode", 3) ; The default tray menu items will not be shown and items are not checked when selected. These are options 1 and 2 for TrayMenuMode.
Example()
Func Example()
Local $iSettings = TrayCreateMenu("Settings") ; Create a tray menu sub menu with two sub items.
Local $iDisplay = TrayCreateItem("Display", $iSettings)
Local $iPrinter = TrayCreateItem("Printer", $iSettings)
TrayCreateItem("") ; Create a separator line.
Local $idAbout = TrayCreateItem("About")
TrayCreateItem("") ; Create a separator line.
Local $idExit = TrayCreateItem("Exit")
TraySetState($TRAY_ICONSTATE_SHOW) ; Show the tray menu.
While 1
Switch TrayGetMsg()
Case $idAbout ; Display a message box about the AutoIt version and installation path of the AutoIt executable.
MsgBox($MB_SYSTEMMODAL, "", "AutoIt tray menu example." & @CRLF & @CRLF & _
"Version: " & @AutoItVersion & @CRLF & _
"Install Path: " & StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1) - 1)) ; Find the folder of a full path.
Case $iDisplay, $iPrinter
while 1
MsgBox(0,'this is my monitor loop','')
WEnd
Case $idExit ; Exit the loop.
ExitLoop
EndSwitch
Beep(500, 50)
sleep(3000)
WEnd
EndFunc ;==>Example