AddMenuItemAddMenuItem — adds a menu item and attaches code to it.
AddMenuItem (parent, pos, label, code)
parentThe parent menu for this item, such as that returned by a call to
CreateSystemMenu or AddSubMenu.
posAn integer desinating the position of this item on the menu.
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 used to populate a submenu of the DataHub system tray menu with a selectable item that runs user-specified code when selected.