hcI Posted March 20, 2017 Share Posted March 20, 2017 (edited) The title says all. How can i disable default items ( Script Paused, Exit ) of the tray menu and set only mine if possible ? Edited March 20, 2017 by hcI Solved Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 20, 2017 Moderators Share Posted March 20, 2017 If you are looking to set your own tray items, look at the example for TrayCreateMenu in the help file. It shows you how to remove the defaults and place your own. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
hcI Posted March 20, 2017 Author Share Posted March 20, 2017 TrayCreateMenu ( "sub/menutext" [, menuID = -1 [, menuentry = -1]] ) I looked out the help but i don't understand how can i disable the others ones Link to comment Share on other sites More sharing options...
Xandy Posted March 20, 2017 Share Posted March 20, 2017 Try, Opt("TrayMenuMode", 1); Default tray menu items (Script Paused/Exit) will not be shown. Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
Xandy Posted March 20, 2017 Share Posted March 20, 2017 (edited) Here are my full codes for this function. Just change, "Open / Hide" to whatever you want and change, 'tray_menu_gui_show_toggle' to whatever function you want assigned. Same thing for "Exit" Alternatively you can probably just remove both TrayItemSetOnEvent() calls. I just tried that. It appears that we get zero options in the tray reference to our script. Lovely. ; Create Tray Menu at bottom right corner of Microsoft Windows Func tray_menu_set($gui_icon_filepath) ; Set an Icon for the Tray Menu TraySetIcon($gui_icon_filepath) Opt("TrayOnEventMode", 1); OnEventMode Opt("TrayMenuMode", 1); Default tray menu items (Script Paused/Exit) will not be shown. ; These Events will fire from anywere in the script b/c TrayOnEventMode 1 above TrayItemSetOnEvent(TrayCreateItem("Open/Hide"), 'tray_menu_gui_show_toggle'); Tray Menu - Show Window Toggle TrayItemSetOnEvent(TrayCreateItem("Exit"), '_exit_hotkey') TraySetClick(8); Makes it so you have to right click the tray TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "tray_menu_gui_show_toggle") TraySetState() EndFunc Edited March 20, 2017 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
hcI Posted March 20, 2017 Author Share Posted March 20, 2017 Thanks you ! It works nice, have a nice day ! Xandy 1 Link to comment Share on other sites More sharing options...
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