• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determine whether spot color is RGB or CMYK in Illustrator CS2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Simon Topliss <email@hidden>
  • Date: Sat, 19 May 2007 09:41:40 +0100

On 18 May 2007, at 21:59, Stephan Peterson wrote:

After much banging of my head against the wall I finally have a solution. Unfortunately, it doesn't involve the scripting of Illustrator due to an apparent bug.

[snip]

On the advice of a co-worker I explored just opening the file in a text editor like Text Wrangler and seeing if by chance I could from any text in the document if RGB sptos were present. BINGO! In the comments/header at the beginning there's a "%%RGB Custom Color:" entry that's present if RGB spots exist in the document. This lead me to the following code for determining and RGB spot colors presence:

set theFile to "path:to:the:file.ai"
-----
set theText to read file theFile
-----
if theText contains "%%RGBCustomColor:" then
	set containsRGB to true
else
	set containsRGB to false
end if

Good work, Stephan!

You might want to change your 'read file' line to...

set theText to read file theFile for 2000

The info you need is only in the header of the AI file. So, just read the first 2000 characters. This will make reading large files a lot quicker.

Adjust the '2000' if required.

Simon
_______________________________________________
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
  • Follow-Ups:
    • Re: Determine whether spot color is RGB or CMYK in Illustrator CS2
      • From: Stephan Peterson <email@hidden>
References: 
 >Re: Determine whether spot color is RGB or CMYK in Illustrator CS2 (From: "stephan peterson" <email@hidden>)
 >Re: Determine whether spot color is RGB or CMYK in Illustrator CS2 (From: Shane Stanley <email@hidden>)
 >Re: Determine whether spot color is RGB or CMYK in Illustrator CS2 (From: "stephan peterson" <email@hidden>)
 >Re: Determine whether spot color is RGB or CMYK in Illustrator CS2 (From: Wayne Melrose <email@hidden>)
 >Re: Determine whether spot color is RGB or CMYK in Illustrator CS2 (From: Stephan Peterson <email@hidden>)
 >Re: Determine whether spot color is RGB or CMYK in Illustrator CS2 (From: Stephan Peterson <email@hidden>)

  • Prev by Date: Re: Filemaker 8.5 stored applescript problem
  • Next by Date: Converting Word files to PDF
  • Previous by thread: Re: Determine whether spot color is RGB or CMYK in Illustrator CS2
  • Next by thread: Re: Determine whether spot color is RGB or CMYK in Illustrator CS2
  • Index(es):
    • Date
    • Thread