AddCustomMenuItemAddCustomMenuItem — a convenience method for creating a menu item.
AddCustomMenuItem (label, code)
labelThe name of the item, as a text string, that will actually appear on the menu.
codeAny piece of code that should be run when the menu item is selected.
A list containing two members: the ID number for this action, followed by a Gamma expression that is the action to be taken when a menu item is selected.
This method is a convenience method for adding a menu item. It is a wrapper on
AddMenuItem. It creates an item for a menu
created by AddCustomSubMenu, allowing any
arbitrary code to be attached. This method can be used for modifying the
application as it runs. Items to be created by this command must be coded
immediately after AddCustomSubMenu, and will appear in
sequence on that submenu.
.AddCustomSubMenu("My Menu", 3);
.AddCustomMenuItem("My First Item, `princ("First Item Activated\n"));
.AddCustomMenuItem("My Second Item, `princ("Second Item Activated\n"));
.AddCustomMenuItem("My Third Item, `princ("Third Item Activated\n"));
...