potitpanda Posted May 6, 2008 Share Posted May 6, 2008 Hi Everybody How to add in my tray menu a Check item How to control the state of this item and do some things (IsChecked) Link to comment Share on other sites More sharing options...
monoceres Posted May 6, 2008 Share Posted May 6, 2008 (edited) Hi! I made a small example for you #Include <Constants.au3> #NoTrayIcon Opt("TrayMenuMode",1) $test = TrayCreateItem("Test") $exititem=TrayCreateItem("Exit") TraySetState() While 1 $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg=$test If BitAND(TrayItemGetState($test),$TRAY_CHECKED) Then TrayItemSetState($test,BitOr($TRAY_UNCHECKED,TrayItemGetState($test))) Else TrayItemSetState($test,BitOr($TRAY_CHECKED,TrayItemGetState($test))) EndIf Case $msg = $exititem ExitLoop EndSelect WEnd Edited May 6, 2008 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now