script to add separators

Viewing 3 reply threads
  • Author
    Posts
    • #91076

      Hello I need help and I am sure somebody will have an answer to it. I need to print large an indesign document that has hundreds of pages, however I need to print a color spread every 8 pages to function as a separator. Now instead of manually enter the spread manually every 8 pages I would like to know if there is a way to do this automatically, maybe a script, this would really help.

    • #91082

      Miguel, this seems to be possible, but you should also care of the applied masterpage and if the pages are paginated, those color spreads must be excluded from the count > every 8 pages a new section is needed.

      Kai

    • #91311

      Hello Kai
      thanks for your answer, a person over in the adobe forums gave me this script which solved the problem and one can adjust it to add separators every number of pages etc. It works and it save me a lot of work:

      var doc = app.documents[0];
      var masterNames = doc.masterSpreads.everyItem().name;
      var d = app.dialogs.add({name:”pick a master spread”});
      d.dialogColumns.add().staticTexts.add({staticLabel:”Master Pages:”});
      var dd = d.dialogColumns.add().dropdowns.add({stringList:masterNames});
      if(d.show()){
      var index = dd.selectedIndex;
      d.destroy();
      } else {
      d.destroy();exit();
      }

      var master = doc.masterSpreads.item(index);
      for(var i=3;i<=doc.pages.length;i+=8){
      doc.pages.add(LocationOptions.AFTER,doc.pages[i],{appliedMaster:master});
      };

    • #95797

      Hello forum!

      Can someone help me add a drop down list for odd or even pages to this existing script?
      I can modify it so it will create new pages “BEFORE” doc.pages but I would like to have the two options in one script…… not two separate scripts.

      Thanks for any help in advance!
      MPB

      var doc = app.documents[0];
      var masterNames = doc.masterSpreads.everyItem().name;
      var d = app.dialogs.add({name:”pick a master spread”});
      d.dialogColumns.add().staticTexts.add({staticLabel:”Master Pages:”});
      var dd = d.dialogColumns.add().dropdowns.add({stringList:masterNames});
      if(d.show()){
      var index = dd.selectedIndex;
      d.destroy();
      } else {
      d.destroy();exit();
      }
      var master = doc.masterSpreads.item(index);
      for(var i=doc.pages.length-1;i>=0;i–){
      doc.pages.add(LocationOptions.AFTER,doc.pages[i],{appliedMaster:master});
      }

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
>