Hi
Can anyone help?
I am trying create spot colours in Illustrator.
I can make a new swatch with ‘spot color info’ but the color i get in the swatches is not a spot colour. It is a global process colour.
How can I make a true spot color in the swatches.
Thanks
Tim
Try this…
set NewSpotColor to make color with properties {space:CMYK, color value:{56, 30, 30, 10}, name:"Spot color"}
set properties of NewSpotColor to {model:spot}
Fishheadtw
No joy, I’m afraid.
Are you in CS, CS2 or CS3?
Comes up with an error ‘Illustrator CS got an error: Can’t make or move that element into that container.’
Any ideas
Tim
I think the error is coming from “make color with properties” - I get that error without the following line to set the model to spot. I get that error when trying to make color with properties {name:“Spot Color”} as well.
I checked the properties of a swatch in CS3 with this
tell application "Adobe Illustrator"
tell document 1
properties of spot "Test Spot Color"
end tell
end tell
->result: {name:“Test Spot Color”,
color:{class:CMYK color info, cyan:80.0, magenta:20.0, yellow:60.0, black:0.0},
color type:spot color, container:document 1 of application “Adobe Illustrator”,
best type:reference, default type:reference,
class:spot,
index:1}
Maybe the line
set properties of NewSpotColor to {model:spot}
needs to be
set properties of NewSpotColor to {class:spot}
But I can’t figure out how to script the creation of a swatch in the first place. I’m new to AI scripting, so I haven’t sussed out how to do things with AI’s take on AppleScript yet.
Got it!
tell application "Adobe Illustrator"
tell document 1
set NewSpotColor to make spot with properties {name:"Spot Color", color:{cyan:80, magenta:20, yellow:60, black:0}, color type:spot color}
--{name:"Spot Color", color:{class:CMYK color info, cyan:80.000001192093, magenta:19.999998807907, yellow:60.000002384186, black:0.0}, color type:spot color, container:document 1 of application "Adobe Illustrator", best type:reference, default type:reference, class:spot, index:1}
end tell
end tell