Copy link to clipboard
Copied
Anyone know if it is possible to write a script that will take all of your "used swatches" and write a list of their swatch names on the artboard? Would be very useful for art approval documents.
#target illustrator function swatchNamesToText() { if (app.documents.length = 0) { return; } else { var docRef = app.activeDocument; var sel = docRef.selection; if (sel.length == 1 && sel[0].typename == 'TextFrame') { var nameList = Array(); var swatGrps = docRef.swatchGroups; for (var i = 0; i < swatGrps.length; i++) {
...Copy link to clipboard
Copied
doesn't saving it as .jsx negate that issue, Larry? I admit i've never tried, but i didn't think you could save a rich text file into jsx format.
Copy link to clipboard
Copied
When I was converting from rich text, it would throw an error message when I tried to run the script. After converting it from rich text to plain text it doesn't throw the error message anymore but nothing happens at all ... Hmmm.. Has anyone else successfully used the code from above?
Copy link to clipboard
Copied
it appears that script is a fairly customized script that requires some conditions to be present in the file upon executing the script. however there is no handling or alerts when conditions aren't met.
You likely need something similar to this, but not exactly. So you'll either need to re-work it or try to find someone to re-work it for you. It would be best to create a new post for that though rather than continue to piggyback on this older thread.