Search the Community
Showing results for tags 'tray item'.
-
Hello, this is just a draft. When I click the tray icon, I get the menu immediately, but once I click "script paused", everything freezes: The icon chances to the red "X", but doesn't flash constantly, just alters from "X" to "Autoit" every 20 seconds, and the next click on the tray icon can take over two minutes. What do I miss? Note: When I set TrayAutoPause=1, then click the tray icon, the tray icon is flashing "X" <-->"Autoit" as usual fast, as long as the tray menu is open. Once I click anything in the menu, the "flashing" is freezing as well. #NoTrayIcon #include <MsgBoxConstants.au3> #include <StringConstants.au3> #include <TrayConstants.au3> ; Required for the $TRAY_ICONSTATE_SHOW constant. Opt("TrayMenuMode", 2) ; don not check / uncheck automatically opt("trayautopause",0) Example() Func Example() Local $idTailLogMain= TrayCreateItem("Start tail main log") Local $idTailErrLog= TrayCreateItem("Start tail error log") TrayCreateItem("") ; Create a separator line. Local $idAbout = TrayCreateItem("About") TraySetState($TRAY_ICONSTATE_SHOW) ; Show the tray menu. While 1 Switch TrayGetMsg() Case $idTailLogMain ; do this case $idTailErrLog ; do that case $idAbout MsgBox(64,@ScriptName,"Version: " & FileGetVersion(@ScriptFullPath) & @CRLF & _ "Autoit Version: " & @AutoItVersion,5) EndSwitch WEnd Sleep(100) EndFunc ;==>Example