Applescript可更改illustrator颜色

Applescript可更改illustrator颜色,applescript,adobe-illustrator,Applescript,Adobe Illustrator,我试图改变illustrator文档中的颜色,从一种颜色到另一种颜色这是我得到的,但它一直在说“找不到颜色”我不确定我做错了什么 tell application "Adobe Illustrator" if exists color is equal to "C=0 M=0 Y=0 K=90" then set color to "C=0 M=0 Y=0 K=100" end if end tell 看起来

我试图改变illustrator文档中的颜色,从一种颜色到另一种颜色这是我得到的,但它一直在说“找不到颜色”我不确定我做错了什么

tell application "Adobe Illustrator"

          if exists color is equal to "C=0 M=0 Y=0 K=90" then

                    set color to "C=0 M=0 Y=0 K=100"

          end if
end tell

看起来它无法理解您设置的确切颜色(即填充颜色、笔划颜色等)。或者,如果您只是设置了一个名为“color”的变量,那么您可能需要选择另一个名称(比如myColor),因为这个名称是保留的

tell application "Adobe Illustrator"
    set allMyItems to every path item of current document whose fill color is {cyan:0.0, magenta:0.0, yellow:0.0, black:90.0}
    repeat with myItem in allMyItems
        set fill color of myItem to {cyan:0.0, magenta:0.0, yellow:0.0, black:100.0}
    end repeat
end tell