0 Replies Latest reply on Nov 12, 2012 12:01 AM by rajnikids

    Moving tints of the colour to desired layer

    rajnikids Level 1

      Hi,

       

      This is the script for moving the fill color (Grid Cyan) items to Grid Cyan layer, whereelse, it doesn't work for tints of the same swatch... i.e. 20% of Grid Cyan....

       

       

      var mydoc=app.documents.item(0);

      var mytexts=mydoc.stories.everyItem().paragraphs.everyItem().getElements( );

       

      for (i=0; i<mytexts.length; i++) {

          var mytext=mytexts[i];

       

          if (mytext.fillColor.name == "Grid Cyan") {

       

      var tf = mytext.parentTextFrames;

      l = tf.length;

      while(l--){tf[l].itemLayer = mydoc.layers.item("Grid Cyan");} // moving filll color grip cyan to layer grid cyan

          }

       

      }

       

       

      (after scrip is complete, still the 20% of the Grid Cyan reamins on the previous layer & not moved to Grid Cyan layers)

       

      CAN ANYBODY HELP ON THIS..