Sign in to follow this  
Followers 0
Gif

Autoit error

2 posts in this topic

#1 ·  Posted (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
EndFunc

please someone try this, i have an error it alwayes returns 577 and i think its a bug, i have the latest beta

PS:i tried several ways , like adding states together like $TRAY_UNCHECKED+$TRAY_DEFAULT and adding also $TRAY_ENABLE

Edited by Gif

Share this post


Link to post
Share on other sites



never mind, i ve used variables

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0