Is there a better way for me to compare and change a fill color in Illustrator CS4?
Using my code below, the list that is returned for the fill color yields CMYK values carried out to many decimal places. Is there a better way to retrieve and return the CMYK values as an integer? I believe that would help make comparison and converting to new values a bit easier and safer.
I appreciate any help I can get.
Thanks,
Jeff
tell application "Adobe Illustrator"
activate
set thisDoc to current document
try
set sel to ((every path item of thisDoc) whose fill overprint is true or stroke overprint is true)
repeat with i from 1 to count of items in sel
set theItem to item i of sel
--if theItem's fill overprint is true then
set theItem's fill overprint to false
set theFill to theItem's fill color
set theFill to theFill as list
set theFill to theFill as text
display dialog theFill as text
--return
if theFill contains "CMYK color info74.60939884185867.57810115814266.79689884185889.843797683716" then
--display dialog "I Do"
set theItem's fill color to {cyan:0, magenta:0, yellow:0, black:100}
end if
end repeat
end try
end tell