AddMenuItem

AddMenuItem — adds a menu item and attaches code to it.

Syntax

AddMenuItem (parent, pos, label, code)
    

Arguments

parent
The parent menu for this item, such as that returned by a call to CreateSystemMenu or AddSubMenu.
pos
An integer desinating the position of this item on the menu.
label
The name of the item, as a text string, that will actually appear on the menu.
code
Any piece of code that should be run when the menu item is selected.

Returns

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.

Description

This method is used to populate a submenu of the DataHub's system tray with a selectable item that runs user-specified code when selected.