5 Replies Latest reply on Aug 12, 2010 10:13 PM by dhishok

    Swatches renaming using Java script

    Green4ever Level 3

      Hi Friends,

       

      I tried to rename the swatches using the following script,

       

      This is not working for tinted swatches. Can you please help me to solve this.

       

       

      var myDocument = app.activeDocument;
      for(i = 4; i<myDocument.swatches.length; i++)
      {
      var mySwatchName = myDocument.swatches.item(i).name;
      myDocument.swatches.item(i).name = "XX_" + mySwatchName;
      }
      var nos = myDocument.swatches.length - 4;
      alert("DONE and " + nos + " swatches renamed");

       

       

      Thanks in advance....