Re: Determine whether spot color is RGB or CMYK in Illustrator CS2
Re: Determine whether spot color is RGB or CMYK in Illustrator CS2
- Subject: Re: Determine whether spot color is RGB or CMYK in Illustrator CS2
- From: Wayne Melrose <email@hidden>
- Date: Thu, 10 May 2007 18:03:52 +0200
On 10. mai. 2007, at 18.00, stephan peterson wrote:
This isn't working either. I tried this and the spot doesn't change
from
RGB to CMYK as I was assuming it would. When I look at what
colorType is
getting set to it's "CMYK color info".
Stephan
And to answer you're actual question, try this:
tell swatch -1
if class of color is spot color info then
-- need to get class of the spot it's based on
set colorType to class of color of spot of color
else
set colorType to class of color
end if
end tell
--
Shane Stanley <email@hidden>
AppleScript Pro Denver, June 2007 <http://scriptingmatters.com/aspro>
Stephen,
I spoke to Shane about this issue off list, he's fast asleep right
now down in Oz, although this is what he told me, the code you have
snipped out here only gives you the class of the colour, to change
it, Shane suggested this code (below), although advised that this is
not tested.
tell swatch -1
if class of color is spot color info then
-- need to get class of the spot it's based on
set colorType to class of color of spot of color
if colorType is RGB color info then
set class of color of spot of color to CMYK
color info
end if
else
set colorType to class of color
if colorType is RGB color info then
set class of color to CMYK color info
end if
end if
end tell
He also mentioned that to get AI to open a file forcing options etc,
you must first turn off dialogs, I don't have that code at the
moment, but I'm sure if you Google it or look on the archives you'll
find something..
Hope that Helps
Wayne Melrose
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden