2 Replies Latest reply on Mar 13, 2013 7:53 AM by Reeza82

    JavaScript Editor opens when I click Run Sequence


      I'm using Batch Sequences to add Headers to my documents, using addWatermark from Text.  I want the file name as part of the watermark.
      The reason I'm using javascript rather than the provided sequence is that I have a few hundred documents and they have a different amount of pages.


      When I click run sequence the javascript editor pops up and if I click OK then everything runs fine, the new doc is created with the header I wanted. 


      But I don't want to click OK a few hundred times and it wasn't happening before, it just started. Is there a way to stop it from popping up? Or a way to figure out why it started?


      I'm on Acrobat 9 Pro 9.0.0 and Windows XP. 


      The code is below:


      /*Adding a header to a document*/


      //This gets the filename

      var re = /\.pdf$/i;

      // filename is the base name of the file Acrobat is working on

      var filename = this.documentFileName.replace(re,"");



      //This adds a header in the right top position


      cText: "(My right header -" + filename +")",

      nStart: 2, //Page to start adding the header

      nEnd: this.numPages-1,  //Pages to stop adding the header



      nTextAlign: app.constants.align.right,

      nHorizAlign: app.constants.align.right,

      nVertAlign: app.constants.align.top,

      nHorizValue: -72,

      nVertValue: -72