Hi,
How can I remove the "Suspend Hotkeys" and "Pause Script" from the menu?
How can I remove item form menu?
Re: How can I remove item form menu?
Remove the standard menu, and then create your own. https://www.autohotkey.com/docs/commands/Menu.htm#NoStandard
- JoeWinograd
- Posts: 2177
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: How can I remove item form menu?
Hi @Marcosa1020,
You can do Menu,Tray,NoStandard and then add whatever menu items you want. For example, here's a context menu that I use in some of my scripts:
Regards, Joe
You can do Menu,Tray,NoStandard and then add whatever menu items you want. For example, here's a context menu that I use in some of my scripts:
Code: Select all
Menu,Tray,NoStandard ; remove standard system tray context menu
Menu,Tray,Add,&About (and Pause),ContextMenu ; first menu item is About (A is keyboard shortcut key)
Menu,Tray,Add,E&xit,ContextMenu ; second menu item is Exit (X is keyboard shortcut key)
Menu,Tray,Default,&About (and Pause) ; default on double-click
-
- Posts: 4309
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: How can I remove item form menu?
Menu items can be removed directly:
Code: Select all
#Persistent
hMenu := MenuGetHandle("Tray")
Loop 2
DllCall("RemoveMenu", "Ptr", hMenu, "UInt", 7, "UInt", MF_BYPOSITION := 0x400)
- JoeWinograd
- Posts: 2177
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: How can I remove item form menu?
Hi teadrinker,
Very interesting! Thanks for posting. That said, I never let a script out the door without my own, custom tray menu. Cheers, Joe
Very interesting! Thanks for posting. That said, I never let a script out the door without my own, custom tray menu. Cheers, Joe