EasyManua.ls Logo

Adobe 0046100128056 - InDesign - Mac - Page 129

Adobe 0046100128056 - InDesign - Mac
209 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CHAPTER 9: Menus Understanding the Menu Model 129
To create a list (as a text file) of all menu actions, run the following script fragment (from the
GetMenuActions tutorial script):
var myMenuActionNames = app.menuActions.everyItem().name;
//Open a new text file.
var myTextFile = File.saveDialog("Save Menu Action Names As", undefined);
//If the user clicked the Cancel button, the result is null.
if(myTextFile != null){
//Open the file with write access.
myTextFile.open("w");
for(var myCounter = 0; myCounter < myMenuActionNames.length; myCounter++){
myTextFile.writeln(myMenuActionNames[myCounter]);
}
myTextFile.close();
}
To create a list (as a text file) of all available menus, run the following script fragment (for the complete
script, see GetMenuNames). These scripts can be very slow, as there are many menu names in InDesign.
application
menuActions
scriptMenuAction
area
enabled
checked
eventListeners
events
id
index
label
name
parent
title
same as menuAction
menuAction
scriptMenuActions
eventListener
eventListener
event
...
...
event

Table of Contents