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.
Object
MenuElement
Represents the application menu bar, menus and submenus, and individual items or commands.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
| 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
Retrieves a menu element object using its unique identifier.
→ void
Removes a script-defined menu or menu item.
Return 2
Methods that return a MenuElement.