I have been trying to create the following applescript and not been having any luck.
I am trying to open my doc in Illustrator CC 2014 remove all unused swatches ( I have this done ) select all swatches except “White_Ink” and convert the color mode from Book → CMYK then Color Type from Spot → Process.
Well what I found out that is when you delete a spot from the swatch palette it automatically converts from “book” to a cymk process color. So I used the following script to keep the 2 I wanted and remove the rest. Unfortunately the spots are no longer listed in the palette anymore.
delete (every swatch whose (name is not “Dieline”) and (name is not “White_Ink”))
Under CS3, a book color is in the spot class; I tested my code with several different book colors from the libraries, and it worked as expected. If it didn’t work under your version, it would be helpful to post the event log from your test and/or the properties of the target, as was previously requested. It is also customary to post an alternative solution.
hyptonic or anybody else who might have the solution,
Can you please post your solution? I am having difficulty as well, trying to convert a swatch’s color mode from Book → CMYK then Color Type from Spot → Process. Using Illustrator CC 2015.
I never found an exact solution but I found that if I deleted all my swatches that were in spot colors it would automatically convert them to process. I wanted to keep my dieline and white ink though as spot.
delete (every swatch whose (name is not "Dieline") and (name is not "White_Ink"))
Thank you very much, this does help. Ultimately I would prefer to retain any swatches that it could possibly convert to process successfully.
I played around with this a bit more and this script appears to delete any “Book” swatch. But it should convert any other non-Book Spot Color swatch to process and leave it within the swatch palette.
tell application "Adobe Illustrator"
set myCount to count of spots of current document
set myName to name of spot myCount of current document
set color type of (spot i of current document whose name is not "[Registration]") to spot color
set color type of (spot i of current document whose name is not "[Registration]") to process color
delete (every swatch of current document whose name is equal to myName)
set myCount to myCount - 1
if myCount is less than 0 then