Adobe 0046100128056 Scripting Guide - Page 129
GetMenuActions tutorial script, To create a list as a text file of all menu actions
UPC - 718659087562
View all Adobe 0046100128056 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 129 highlights
CHAPTER 9: Menus Understanding the Menu Model 129 application menuActions menuAction area checked enabled eventListeners id index label name events parent title scriptMenuActions scriptMenuAction same as menuAction eventListener eventListener ... event event ... 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.