Gif Posted August 5, 2007 Share Posted August 5, 2007 (edited) #Include <Constants.au3> Opt("TrayMenuMode", 1) $test = TrayCreateItem('test', -1, -1, 1) TrayItemSetState(-1, $TRAY_DEFAULT) while 1 $nmsg = TrayGetMsg() If $nmsg = $test then _test() endif wend Func _test() $state = TrayItemGetState($test) MsgBox(0, "", $state) If $state = 577 Then TrayItemSetState($test, $TRAY_UNCHECKED) TrayItemSetState($test, $TRAY_DEFAULT) Else TrayItemSetState($test, $TRAY_CHECKED) TrayItemSetState($test, $TRAY_DEFAULT) EndIf EndFuncplease someone try this, i have an error it alwayes returns 577 and i think its a bug, i have the latest betaPS:i tried several ways , like adding states together like $TRAY_UNCHECKED+$TRAY_DEFAULT and adding also $TRAY_ENABLE Edited August 5, 2007 by Gif Link to comment Share on other sites More sharing options...
Gif Posted August 5, 2007 Author Share Posted August 5, 2007 never mind, i ve used variables 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