Lemures Posted April 22, 2007 Posted April 22, 2007 I have a point in my script where the options in the tray need to change. How do I simply destroy what I have populating the tray and rebuild it?
Valuater Posted April 22, 2007 Posted April 22, 2007 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)
Lemures Posted April 22, 2007 Author Posted April 22, 2007 That only deletes what I choose though, I need to delete EVERYTHING. Is there a way to get a list of tray_ids so that I can just do a little loop to delete them all?
Lemures Posted April 22, 2007 Author Posted April 22, 2007 For $i = 1 To 100 TrayItemDelete($i) Next meh. that works. i doubt ill ever go above 100. *shrug*
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