Bridge2021
Object

MenuElement

Represents the application menu bar, menus and submenus, and individual items or commands.

Properties

NameType AccessDescription
Boolean readonly When true, the Alt modifier key was pressed when the item was selected.
Boolean readonly Whether the menu item can be checked.
Boolean read/write Whether the item is checked.
Boolean readonly When true, the Command modifier key was pressed when the item was selected.
Boolean readonly When true, the Control modifier key was pressed when the item was selected.
Boolean read/write Whether the menu or item is enabled.
String readonly A unique identifier for the element.
String readonly A string describing the location of the new menu element, with respect to existing menu elements.
Boolean readonly When true, the Option modifier key was pressed when the item was selected.
Boolean read/write Whether there is a separator after this item.
Boolean read/write Whether there is a separator before this item.
Boolean readonly When true, the Shift modifier key was pressed when the item was selected.
String read/write The displayed label text, a localizable string.
String readonly The type of menu element, a menu or command.

Methods

MenuElement

Adds a new menu to the menu bar, a new submenu to an existing menu, or a new command to an existing menu or submenu.

type String The type of menu element, a menu or command.
text String The localizable string that is displayed as the label text.
location String A string describing the location of the new menu element, with respect to existing menu elements.
id? String The unique identifier for this element.
MenuElement

Retrieves a menu element object using its unique identifier.

id String The unique identifier for the menu element to find.
void

Removes a script-defined menu or menu item.

id String The unique identifier for the menu element to remove.

Return 2

Methods that return a MenuElement.