Scripting Spot Colour Changes in Illustrator 10


Scripting Spot/Special Colors in Illustrator 10

A question from an Adobe Systems collegue- how do you script changing a named spot or special colour to a CMYK colour in Illustrator 10?

In this piece of AppleScript, it assumes that the first document is the one we are interested in. Change to suit your own purposes.

The object new_definition contains a record detailing the new CMYK object’s colour definition.

The variable change_swatch is the named swatch we are looking for.

Finally, the line starting set color... does the changing. It gets the named colour and changes it to the new colour definition.

tell application "Adobe Illustrator 10"

tell document 1

set new_definition to {cyan:0.0, magenta:75.0, yellow:10.0, black:50.0}
set change_swatch to swatch "changing_this_colour"
set color of spot of color of change_swatch to new_definition

end tell

end tell

I hope this helps someone out