Re: another Illustrator swatch question
Re: another Illustrator swatch question
- Subject: Re: another Illustrator swatch question
- From: Shane Stanley <email@hidden>
- Date: Thu, 29 Nov 2001 08:09:03 +1100
On 28/11/01 6:18 PM +1000, Edmond Cho, email@hidden, wrote:
>
It reminded me, though, of an old scripting question I faced that I had
>
given up on. I have a script that creates swatches in an Illustrator 9
>
document from a text file of CMYK values. I could not for the life of me
>
decipher the scripting guide and error messages to figure out how I could
>
make the swatches "global."
>
>
-- excerpt
>
tell application "Adobe Illustrator. 9.0.2"
>
if not (exists swatch ColorName in current document) then
>
>
set swatchColor to {cyan:Cval, magenta:Mval, yellow:Yval, black:Kval}
>
make new swatch at beginning of current document with properties ,
>
{name:(ColorName as string), color:swatchColor}
>
end if
>
end tell
>
-- end excerpt
>
>
This is an infrequent, but regular process. I find myself creating the
>
swatches, then manually opening each color in order to hit the "global"
>
checkbox. Not terrible, since I only run the script a few times a month or
>
so, but it would be nice to finally fix this whole in my script.
>
>
Anybody know the magic words?
I find this area of AI pretty confusing. You can't change a color to global,
but you can make it global at creation time. The key is to make a new spot,
rather than a swatch, and set its type to process color.
I don't know whether this has changed in AI 10; I fear backwards
compatibility beat out common sense.
--
Shane Stanley, email@hidden