2 Replies Latest reply on Feb 11, 2009 10:59 PM by (senthil_nagore)

    Add menus in Start up Script

    (subha_oviya) Level 1
      Hi All,

      How to add Menus and menu item in Indesign Start up Script?

      Thanks
      Senthil.C
        • 1. Re: Add menus in Start up Script
          Kasyan Servetsky Level 5


          #targetengine "session"
          var myScript1 = new File(app.filePath + "/Scripts/Scripts Panel/script1.jsx");
          var myScriptAction1 = app.scriptMenuActions.add("Script 1");
          var myEventListener1 = myScriptAction1.eventListeners.add("onInvoke", myScript1, false);

          var myScript2 = new File(app.filePath + "/Scripts/Scripts Panel/script2.jsx");
          var myScriptAction2 = app.scriptMenuActions.add("Script 2");
          var myEventListener2 = myScriptAction1.eventListeners.add("onInvoke", myScript2, false);

          try{
             var myScriptMenu = app.menus.item("$ID/Main").submenus.item("Scripts");
             myScriptMenu.title;
          }
          catch (myError){
             var myScriptMenu = app.menus.item("$ID/Main").submenus.add("Scripts");
          }

          var myScriptMenuItem1 = myScriptMenu.menuItems.add(myScriptAction1);
          var myScriptMenuItem2 = myScriptMenu.menuItems.add(myScriptAction2);
          • 2. Re: Add menus in Start up Script
            Hi Kasyan Servetsky,

            It works,Many thanks.

            Regards
            Senthil.C