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

Merged Text Frame

Return to Member Forum

  • Author
    Posts
    • #88877
      Kathy Cote
      Member

      Hi,
      In this code, where can I write my (\r) for a return between each line instead of merge all on one line
      Someone of you have an idea?

      this is my code:

      #target indesign

      for(var n=0;n<app.selection.length-1;n++){app.selection[n].nextTextFrame = app.selection[n+1]};

      var myStories = app.activeDocument.stories.everyItem().getElements();
      for (i = myStories.length – 1; i >= 0; i–){
      var myTextFrames = myStories[i].textContainers;
      for (j = myTextFrames.length – 1; j >= 0; j–) {
      if (myTextFrames[j].contents == “”){
      myTextFrames[j].remove();
      }
      }
      }

    • #88878
      Matt Isaac
      Participant

      I assume this is what you want:
      for(var n=0;n<app.selection.length-1;n++){
      app.selection[n+1].insertionPoints[0].contents = "\r";
      app.selection[n].nextTextFrame = app.selection[n+1]
      }

    • #88880
      Kathy Cote
      Member

      hi,
      YES!!! It’s exactly that!!!

      Thanks a lot!

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
Forum Ads