Jump to content

Autoit error


Gif
 Share

Recommended Posts

#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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...