Copy link to clipboard
Copied
Is there a way to: 1. Select swatches in swatch panel with JS 2. Use the Merge Swatches command with JS
Copy link to clipboard
Copied
You can select using itemByName from swatch and for merge swatches the velow links are useful
Copy link to clipboard
Copied
There is no method itemByName in javascript , but there is a method getByName. This will return a swatch but does not select in swatch panel.
Copy link to clipboard
Copied
You are right..Sorry..am new in Illustrator scripting.. in Indesign we used itemByName..
Copy link to clipboard
Copied
Try app.activeDocument.layers.getByName ("layer name").selected=true;
Copy link to clipboard
Copied
The code you write is for layers. Although it will not worked for layers as well but my requirement is to select the swatch from swatch panel of the Illustrator.
Copy link to clipboard
Copied
Hey Developer1009,
have you found a solution for merging the swatches? I'm looking for the same feature, but I cannot find any solution.
regards!