1 Reply Latest reply on Apr 17, 2009 1:11 AM by Kasyan Servetsky

    Event listener script placement

    sudar1983_14 Level 2

      Hi,

       

      CS3/Javascript/Windows

       

      Im try to run event listener, where i want to place my script. Either it is startup or normal script folder.

       

      Regards,

      sudar.

        • 1. Re: Event listener script placement
          Kasyan Servetsky Level 5

          Hi Sudar,

           

          You should place your script into 'Adobe InDesign CS3\Scripts\Startup Scripts' folder and use persistent engine e.g. #targetengine "session".

          Below is an example script that I use:

           

          #targetengine "session"
          myScriptPath = app.filePath + "/Scripts/Scripts Panel/ExportEachPageAsJPEG and Save v6.2.jsx";
          var myFile = new File (myScriptPath);
          if (myFile.exists) {
              var myEventListener = app.addEventListener( "afterSave", myFile, false );
          }

           

          Kasyan