Applescript Illustrator错误号-1700 Can’;不要在类型引用中结束

Applescript Illustrator错误号-1700 Can’;不要在类型引用中结束,applescript,Applescript,我把这个脚本放在一起,它工作了,但我得到了错误号-1700不能结束到类型引用中。我怀疑我的指示块不正确?任何建议都将不胜感激。 提前谢谢 tell application "Adobe Illustrator" --(resize page) set newWidth to 17 set newWidthPoints to newWidth * 72 -- (1 inch = 72 points) set newHeight to 22 set newHeightPoints to newH

我把这个脚本放在一起,它工作了,但我得到了错误号-1700不能结束到类型引用中。我怀疑我的指示块不正确?任何建议都将不胜感激。 提前谢谢

tell application "Adobe Illustrator"

--(resize page) 
set newWidth to 17
set newWidthPoints to newWidth * 72 -- (1 inch = 72 points)
set newHeight to 22
set newHeightPoints to newHeight * 72 -- (1 inch = 72 points)
set artboard rectangle of artboard 1 of document 1 to {0.0, 0.0, newWidthPoints, -newHeightPoints}

--(make spots)
activate
tell document 1
    set docColorSpace to color space
    if (docColorSpace is CMYK) then
        set SpotColor1 to {cyan:21.0, magenta:0, yellow:100.0, black:0.0}
        set SpotColor2 to {cyan:11.0, magenta:100, yellow:30.0, black:0.0}
        set SpotColor3 to {cyan:0.0, magenta:0, yellow:0.0, black:100.0}
        set SpotColor4 to {cyan:75.0, magenta:0, yellow:100.0, black:0.0}
    else
        set SpotColor1 to {red:206.0, green:219.0, blue:41.0}
        set SpotColor2 to {red:215.0, green:23.0, blue:111.0}
        set SpotColor3 to {red:35.0, green:34.0, blue:33.0}
        set SpotColor4 to {red:57.0, green:181.0, blue:74.0}

    end if

    make new spot with properties {name:"Highlight White", color type:spot color, color:SpotColor1}
    make new spot with properties {name:"Under Base", color type:spot color, color:SpotColor2}
    make new spot with properties {name:"Spot Black", color type:spot color, color:SpotColor3}
    make new spot with properties {name:"Barrier Base", color type:spot color, color:SpotColor4}


    set rectProps to {fill color:"C=0 M=0 Y=0 K=0", stroke weight:0.5}

    --(New Layer)

    make new layer

    --(make guides)
    set Rectangle1 to make new rectangle with rectProps
    set width of Rectangle1 to 0
    set height of Rectangle1 to 1728
    set position of Rectangle1 to {324, 72}

    set Rectangle2 to make new rectangle with rectProps
    set width of Rectangle2 to 0
    set height of Rectangle2 to 1728
    set position of Rectangle2 to {612, 72}

    set Rectangle3 to make new rectangle with rectProps
    set width of Rectangle3 to 0
    set height of Rectangle3 to 1728
    set position of Rectangle3 to {900, 72}

    set Rectangle4 to make new rectangle with rectProps
    set width of Rectangle4 to 1368
    set height of Rectangle4 to 0
    set position of Rectangle4 to {-72, -72}

    set selection to every page item of layer 1
end tell
end tell
tell application "Adobe Illustrator"
activate
tell document 1
    tell application "System Events"
        tell process "Illustrator"
            keystroke "5" using {command down}
        end tell
    end tell
end tell
end tell
end

在代码的末尾有一个额外的
end
关键字,您应该去掉它,但是不管怎样,这个脚本都可以使用OMM(10.10,CS6)。顺便说一句,在AI中制作指南不需要GUI脚本:只需将
设置选择…
行替换为
将第1层每个页面项目的指南设置为true
。太棒了,谢谢!!我感谢你的帮助。我找遍了所有关于导游的地方,但总是找错了地方。我也删掉了添加专色部分,它编译得更好,并且没有返回任何错误。