2 Replies Latest reply on Oct 23, 2009 12:54 AM by S.Biancardo

    Run Script at indesign startup

    S.Biancardo Level 1

      Hi anyone can tell me to how can run a script on startup indesign?and how can i to insert a menu on indesign startup?

      Thank [Excuse my Englis]

        • 1. Re: Run Script at indesign startup
          Kasyan Servetsky Level 5

          how can run a script on startup indesign?

          Create this folder, if it doesn't exist, and place the script into it:

          \Adobe InDesign CS3\Scripts\Startup Scripts

           

          how can i to insert a menu on indesign startup?

          Here is an example:

           

          #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: Run Script at indesign startup
            S.Biancardo Level 1

            Thank A lot