2 Replies Latest reply on Jun 4, 2008 11:08 AM by (Robert_Doyle)

    Adding menuItems to the Pages context menu

      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)
        • 1. Re: Adding menuItems to the Pages context menu
          Level 1
          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
          • 2. Re: Adding menuItems to the Pages context menu
            Level 1
            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();
            }