2 Replies Latest reply on Feb 28, 2014 4:19 PM by MatLac

    adding numbers inside the script

    MatLac Level 1

      I have a script for automating printing.

      I have a checkbox on top of each pages that get checked if the page needs to be printed.

      Then, a loop puts each page number in an array that is then ran through a print process.

      The part shown here prompts the user to the number of pages that will be printed through the array length property.

       

      for (var pa = 0 ; pa <= 3 ; pa++) {

      if (this.getField("PRINT."+pa+".CKB").value != "Off") {

        printarr[printarr.length] = pa ;

      }

      }

      app.alert("Your file contains" + printarr.length + " pages.", 4, 0, "Printing");

       

      Now, I need to add "2" to that number because two more pages will accompany this function.

      For example, if the user fills 8 pages, I need to tell him that 10 pages will be printed.