title: is there any script to change specific global CMYK color with another one in the global CMYK swatch?
body: <p>I am looking up for a script to change specific global CMYK color to another from the global CMYK swatch, across all open documents in illustrator.</p>
  <p>I have tried this script, and it works good but, I have to put new color values in script every time. is it possible to skip this and I can replace the colors by color name in the swatches without modifying script every time?</p>
  <pre><code>var folder = Folder(&quot;d:/_&quot;);
  var files = folder.getFiles(&quot;*.ai&quot;);
  for (var i=0; i&lt;files.length; i++) {
  var doc = app.open(files[i]);
  var my_color = doc.swatches.getByName(&quot;color&quot;);
  my_color.color.spot.color.cyan    = 100;
  my_color.color.spot.color.magenta = 0;
  my_color.color.spot.color.yellow  = 100;
  my_color.color.spot.color.black   = 0;
  doc.save();
  doc.close();
  }
  </code></pre>