4 Replies Latest reply on Dec 18, 2011 11:04 PM by Selva_TRM

    error when appling color for find text

    Selva_TRM Level 1

      Dear All,


      I am trying to find double combined words and color them, my script finds but not color them, here is the script


      can anyone find the error in this script, it is very much kind of you.



      var myDoc = app.activeDocument;

      app.findGrepPreferences.findWhat = "(\\w+)-(\\w+)";

      var finds = myDoc.findGrep();

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

      var a = finds[i].contents;

      a.fillcolor = myDoc.colors.item("Red");




      Thanks in advance.