setmenu
Adds a popup menu to the menu bar
Usage
setmenu [-q] [-i=<index:integer>] <visible_text:string> [menu_name:string]
Description
Adds an existing popup menu to the current frame's menu bar.
<visible_text> is used as menu identification and obviously as the visible menu bar text for the new popup.
If a popup menu with the same <visible_text> or the same <menu_name> already exists in the current frame, it is removed first.
<visible_text> can optionally contain the ]&] character to identify the popup menu accelerator.
[menu_name], if given, must be a valid name of a popup menu created earlier with defpopup (or the popup editor).
If [menu_name] is not given, the popup menu identified by <visible_text> is removed.
If the -i switch is used, the new popup menu will be placed to the left of the default menu-bar item specified in the zero based <index>.
menu-bar text item: the new popup menu will be placed on the left of that default item.
If -q is used, this command prints no warnings (intended for use when you are unsure that the menu exists - normal warning messages are debugging aids and have no consequence).
Switches
-q | --quiet
Run quietly: do not print any warnings
-i=<index:integer> | --index=<index:integer>
Place the popup menu on the left of the existing menubar item at the specified index
Examples

setmenu -q -i=2 Test a popup
setmenu Test
setmenu ThisDoesNotExist
setmenu -q ThisDoesNotExist
See also
defpopup

Index, Commands