Jump to content

Rebuild tray menu


Recommended Posts

just changed a few lines from the help file

#Include <Constants.au3>
#NoTrayIcon

Opt("TrayMenuMode",1)    ; Default tray menu items (Script Paused/Exit) will not be shown.


$aboutitem        = TrayCreateItem("Create")
TrayCreateItem("")
$exititem        = TrayCreateItem("Exit")
TrayCreateItem("")
$delitem        = TrayCreateItem("Delete")


TraySetState()

While 1
    $msg = TrayGetMsg()
    Select
        Case $msg = 0
            ContinueLoop
        Case $msg = $aboutitem
            If $delitem = "" Then
                $delitem        = TrayCreateItem("Delete")
            EndIf
        Case $msg = $delitem
            If $delitem <> "" Then
            TrayItemDelete($delitem)
            $delitem = ""
            EndIf
        Case $msg = $exititem
            ExitLoop
    EndSelect
WEnd

Exit

8)

NEWHeader1.png

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