Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

select pages in indesign

Tagged: 

Return to Member Forum

  • Author
    Posts
    • #70496
      Anonymous
      Inactive

      I need to select alternatively all even or odd pages in a file
      is there a script to do so?
      guido

    • #70532

      Scripts cannot *select* pages (that is, make them appear ‘selected’ in the Pages panel).

      But “selecting pages” is, on itself, not a useful task. Can you explain WHY you want to have them selected? Do you want to print them, or export, delete, find text, apply a master, or anything else?

    • #70533
      Anonymous
      Inactive

      Thanks for your answer
      I need to select pages to apply masters
      Guido

    • #70989

      try this:

      var myDocument = app.activeDocument;
      var myPages = myDocument.pages;

      //change i=0 – for select odd; or i=1 – for select even
      for (i=0; i<(myDocument.pages.count()); i=i+2){
      myPages.item(i).select(SelectionOptions.ADD_TO);
      }

    • #71015

      (Alexey: funny, it seems pages *are* selectable in the latest version! But it’s not necessary to apply a master.)

      In the place of “MasterName”, below, fill in the exact name of the master that you want to apply. That is *with* the Prefix and the full name, such as “A-Master”.

      
      var myDocument = app.activeDocument;
      var myPages = myDocument.pages;
      var myMaster = myDocument.masterSpreads.item("MasterName");
      //change i=0 – for select even; or i=1 – for select odd
      for (i=0; i<myPages.length; i=i+2)
      {
          myPages.appliedMaster = myMaster;
      }
      
Viewing 4 reply threads
  • You must be logged in to reply to this topic.
Forum Ads