MenuAction
A menu action.
Superclass of ScriptMenuAction
QuickLinks
Hierarchy
Properties
Property | Type | Access | Description |
---|---|---|---|
area | string | readonly | The menu action area. |
checked | bool | readonly | If true, the menu item associated with the menu action is checked. |
enabled | bool | readonly | If true, the MenuAction is enabled. |
eventListeners | EventListeners | readonly | A collection of event listeners. |
events | Events | readonly | A collection of events. |
id | number | readonly | The unique ID of the MenuAction. |
index | number | readonly | The index of the MenuAction within its containing object. |
isValid | bool | readonly | Returns true if the object specifier resolves to valid objects. |
label | string | r/w | A property that can be set to any string. |
name | string | readonly | The name of the MenuAction. |
parent | Application | readonly | The parent of the MenuAction (a Application). |
properties | Object | r/w | A property that allows setting of several properties at the same time. |
title | string | readonly | The name of the MenuAction for display in the user interface. The title includes any ampersand characters (&), which are used to tell the Windows OS to underline the following character in the name for use with the Alt key to navigate to a menu item. Double ampersands are used to display an actual ampersand character in the name. The Mac OS ignores and removes the extra ampersand characters. |
Methods
Instances
EventListener addEventListener (eventType:
string, handler:
any[, captures:
bool=false])
Adds an event listener.
Parameter | Type | Description |
---|---|---|
eventType | string | The event type. |
handler | File JavaScript Function | The event handler. Can accept: File or JavaScript Function. |
captures | bool | If true, the handler is called only in the capturing phase of event propagation. If false, the handler is called in the bubbling phase if the event is an ancestor of the target, or in the at-target phase if the parent of the event listener is itself the target of the event. (Optional) (default: false) |
string extractLabel (key:
string)
Gets the label value associated with the specified key.
Parameter | Type | Description |
---|---|---|
key | string | The key. |
Array of MenuAction getElements ()
Resolves the object specifier, creating an array of object references.
void insertLabel (key:
string, value:
string)
Sets the label to the value associated with the specified key.
Parameter | Type | Description |
---|---|---|
key | string | The key. |
value | string | The value. |
void invoke ()
Invoke the action.
bool removeEventListener (eventType:
string, handler:
any[, captures:
bool=false])
Removes the event listener.
Parameter | Type | Description |
---|---|---|
eventType | string | The registered event type. |
handler | File JavaScript Function | The registered event handler. Can accept: File or JavaScript Function. |
captures | bool | If true, the handler responds only in the capture phase. (Optional) (default: false) |
string toSource ()
Generates a string which, if executed, will return the MenuAction.
string toSpecifier ()
Retrieves the object specifier.
Element of
MenuItem.associatedMenuAction
Used in:
array of MenuAction MenuActions.itemByRange (from: any, to: any)
MenuAction MenuActions.nextItem (obj: MenuAction)
MenuAction MenuActions.previousItem (obj: MenuAction)
MenuItem MenuItems.add (associatedMenuAction: MenuAction[, at: LocationOptions=LocationOptions.AT_END][, reference: MenuElement][, withProperties: Object])
Return
Array of MenuAction MenuAction.getElements ()
MenuAction MenuActions.[] (index: number)
MenuAction MenuActions.anyItem ()
Array of MenuAction MenuActions.everyItem ()
MenuAction MenuActions.firstItem ()
MenuAction MenuActions.item (index: any)
MenuAction MenuActions.itemByID (id: number)
MenuAction MenuActions.itemByName (name: string)
Array of MenuAction MenuActions.itemByRange (from: any, to: any)
MenuAction MenuActions.lastItem ()
MenuAction MenuActions.middleItem ()
MenuAction MenuActions.nextItem (obj: MenuAction)
MenuAction MenuActions.previousItem (obj: MenuAction)
Jongware, 20-Jun-2010 v3.0.3d | Contents :: Index |