Jump to content

Option in trayMenu with checking cursor


Recommended Posts

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 by monoceres

Broken link? PM me and I'll send you the file!

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...