Wednesday, March 20, 2019

#1 2019-03-15 01:39:54 am

Registered: 2019-03-14
Posts: 1

Fill Illustrator Compound Path with Apple Script


after just reading and learning a lot of Apple Script. I tried to make a a script to change the color of compound path items. But it looks like that it doesn't work.

I get an Error "„Adobe Illustrator“ hat einen Fehler erhalten: „every compound path item of document 1 whose filled = true“ kann nicht als „{class:spot color info, tint:100.0, spot:spot 1 of document 1}“ gesetzt werden."

Maybe there is someone who solved this problem alreadys or may help me.


tell application "Adobe Illustrator"
   tell document 1
       set LayerCut to "Reg"
       set SpotColor to color of swatch "Spot Color"
       set (fill color of every compound path item whose filled is true) to SpotColor
   end tell
end tell


Model: iMac
AppleScript: 2.7
Browser: Safari 537.36
Operating System: macOS 10.13



#2 2019-03-17 05:23:05 pm

Marc Anthony
From:: Dallas, TX
Registered: 2006-04-27
Posts: 855

Re: Fill Illustrator Compound Path with Apple Script

Hi. Compound paths have no color property; their color comes from constituent path items. 


tell application "Adobe Illustrator"'s document 1
   set chosenSpot to spot "Spot Color"'s color
   repeat with counter from 1 to count compound path items
       set compound path item counter's path item 1's fill color to chosenSpot
   end repeat
end tell



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)