5 Replies Latest reply on Jul 26, 2012 2:45 PM by absqua

    Indesign CS5 // GREP // Help with Alternating Paragraph  Coloring Script


      Hello All !


      Last year I posted a question in this Forum


      {Whoops I posted the wrong link earlier it's fixed now}

      and now I have to re-create the same list effect.


      The following script was written by John Hawkinson

      var i, p;
      for (i=0; i<app.selection[0].paragraphs.length; i++) {
        p = app.selection[0].paragraphs[i];
        if (i%3 === 2) { p.fillTint = 50; }
        if (i%2 === 1) { p.fillTint = 30; }


      innitialy the list of names is set with returns between each name like-so:  List A.png


      When I color them with the script it works great:Screen shot 2012-07-25 at 2.10.47 PM.png

      but when I find and replace space for ^p the effect remains on roughly a line and half of names. (Up until the name 'Robert Bernardini' ).

      Screen shot 2012-07-25 at 2.14.04 PM.png

      A few things I can't understand are:

      1. If I delete the ^P manualy the color effect stays.

      2. in last years list it works for the entire text box no matter what I do to the ^P's

      the whole text box stays colored.

      3. why does it stop working in the middle of the second line.


      Last years working list:


      Screen shot 2012-07-25 at 2.19.25 PM.png


      Any help would be super appreciated and rewarded with cheese.

      Thank you everyone in advance !


      Message was edited by: IgnorantTurtle - because he's dumb and he posted the wrong link