I try to make a script, that change the color of my text in my Illustrator File. The new color should be a PANTONE Color.
tell application "Adobe Illustrator"
activate
set the selection to every text frame of document 1
set fill color of every word of every text frame of current document to {spot:spot "PANTONE 300U"}
end tell
You need to set the fill colour of the text to the ‘colour’ of the spot.
tell application "Adobe Illustrator"
tell document 1
if exists spot "PANTONE 300 U" then
set My_Spot_Colour to color of spot "PANTONE 300 U"
set fill color of every text of every text frame to My_Spot_Colour
else
display dialog "Spot NOT found?" giving up after 2
end if
end tell
end tell
What a load of old rubbish. Got my syntax mixed up trying to convert something I now do in JavaScript back to AppleScript. This should be closer.
tell application "Adobe Illustrator"
tell document 1
if exists spot "PANTONE 300 U" then
set My_Spot_Colour to spot "PANTONE 300 U"
set fill color of every text of every text frame to {class:spot color info, tint:100.0, spot:My_Spot_Colour}
else
display dialog "Spot NOT found?" giving up after 2
end if
end tell
end tell