Hi there,
I am trying to create a script in AppleScript to make a new spot color swatch that must be the COLOR TYPE : SPOT (with specific values). I've got it to make a global process color but can't seem to make a spot swatch. I'm using the script below :
tell application "Adobe Illustrator"
set docColorSpace to color space of document 1
if (docColorSpace is CMYK) then
set SpotColor to {cyan:100.0, magenta:0, yellow:0.0, black:0.0}
else
set SpotColor to {red:0.0, green:174.0, blue:239.0}
end if
make new spot in document 1 with properties {name:"ADHESIVE", color:SpotColor}
end tell
I did find an entry in an old forum that did this using javascript, however, I am not experienced with this at all and have no idea what or how to use it on a mac platform. This script is listed below.
#target illustrator
var docRef = app.activeDocument;
var newCMYK = new CMYKColor();
newCMYK.cyan = 100;
newCMYK.magenta = 0;
newCMYK.yellow = 0;
newCMYK.black = 0;
var thisSpot = docRef.spots.add();
thisSpot.name = 'ADHESIVE';
thisSpot.color = newCMYK;
thisSpot.colorType = ColorModel.SPOT;
Any help would be greatly appreciated.
Thank you!