OverviewExamples
table Application.GetMenu ( |
) |
Returns a numerically indexed table containing the current menu structure of the application's menu bar.
None.
(table) A numerically indexed table of menu item tables, or nil if an error occurs. Each position of the table will contain the following keys:
KEY |
TYPE |
DESCRIPTION |
ID |
number |
The numeric ID of the menu item. Note: If a menu item contains any submenu items, its ID will be -1. If a menu item is a separator, its ID will be 0. |
Text |
string |
The text of the menu item. Note that a separator item's Text is set to "---". |
IconID |
number |
The 0-based icon index from the Image List specified on the Menu Bar for the menu item. |
Enabled |
boolean |
Whether the menu item is enabled. |
Checked |
boolean |
Whether the menu item is checked. |
SubMenu |
table |
A numerically indexed table of menu item tables if child elements exist, or nil if no child elements exist. |
You can use Application.GetLastError to determine whether this action failed, and why.
When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.
See also: Related Actions