Skip to main content
Participant
June 4, 2008
Question

Adding menuItems to the Pages context menu

  • June 4, 2008
  • 2 replies
  • 352 views
I am trying to add menuitems to the Pages context menu. I found this:
http://support.adobe.com/devsup/devsup.nsf/docs/50383.htm

But is specifically says those are SOME of the keys for the menus. Anyone happen to have a list? (I and other people may wish to add them to the Pages, or other context menus)
This topic has been closed for replies.

2 replies

Participant
June 4, 2008
hmmmm.... I think I got what you are talking about (kinda modified the one that was there):

var myMenuNames = app.menus.everyItem().name;
var myTextFile = File.saveDialog("Save Menu Action Names As", undefined);
if(myTextFile != null){
myTextFile.open("w");
for(var myCounter = 0; myCounter < myMenuNames.length; myCounter++){
myTextFile.writeln(myMenuNames[myCounter]);
}
myTextFile.close();
}

Furthermore... Since I actually found the name of the menu I was looking for.

var myMenuNames = app.menus.item("Pages Panel Pages Context Menu").menuElements;
var myTextFile = File.saveDialog("Save Menu Action Names As", undefined);
if(myTextFile != null){
myTextFile.open("w");
for(var myCounter = 0; myCounter < myMenuNames.length; myCounter++){
try{myTextFile.writeln(myMenuNames[myCounter].name);}catch(e){}
}
myTextFile.close();
}
Known Participant
June 4, 2008
Hi Robert,

There's a script in the Menus chapter of the CS3 Scripting Guide that dumps all of the menu names out to a text file. You can get the script from the Scripting Guide scripts archive.

Thanks,

Ole