Change fill color of group item to spot

Hi folks,

I need more help !

I have a group item on an illustrator page that is filled with ‘Registration’.

I want to change it’s color to a spot swatch that already exists in my swatch palette.

I can use this script to change the group item to “Cyan”:

tell application “Adobe Illustrator”
activate
set openDoc to document 1
set ftClr1 to first group item of openDoc

set ftClr1Paths to path items of ftClr1
repeat with thisPath in ftClr1Paths
	set fill color of thisPath to {cyan:100}
end repeat
set textFrames to text frames of ftClr1
repeat with thistext in textFrames
	set fill color of every line of thistext to {cyan:100}
end repeat	

end tell

But when I want to change it to “PANTONE 485 C” for example - I don’t know how to get it to do it.

Any idea’s ???

Hi Swardle

Try something like this:

tell application "Adobe Illustrator"
	set fill color of every path item of document 1 whose fill color is {class:spot color info, tint:100.0, spot:spot "[Registration]" of document 1} to {class:spot color info, tint:100.0, spot:spot "PANTONE 485 C" of document 1}
	set fill color of words of every text frame of document 1 whose fill color is {class:spot color info, tint:100.0, spot:spot "[Registration]" of document 1} to {class:spot color info, tint:100.0, spot:spot "PANTONE 485 C" of document 1}
end tell

Hope that gets it for you it worked in my tests.

pidge1 - you are officially “Hero of the day” !!! works a treat - thanks for you help.