title: Illustrator Javascript: Select Based on Swatch
body: <p>Is there anyway to make a Javascript Illustrator script that will select everything in the document that has a particular color? I can't find any information anywhere. I do know that you can do what I'm asking with the Select drop down menu, but I need this as part of a script.</p>
  
  <p>I've tried something like:</p>
  
  <p><code>myDoc.selection = Spot.name("CutContour");</code> </p>
  
  <p>and </p>
  
  <p><code>myDoc.selection = myDoc.spots.item("CutContour");</code></p>
  
  <p>but neither work.</p>