【发布时间】:2015-06-11 15:02:46
【问题描述】:
我目前正在尝试自动化一个过程,即我获取一个 .ai 文件,将其保存到桌面,然后将所有文本更改为轮廓,并将另一个副本保存到桌面,并在名称中添加 _OL,例如
IN> server/elements.ai
OUT> desktop/elements.ai & desktop/elements_OL.ai
感谢 Tim Joe,它现在可以保存,但它不会选择文本以将其转换为轮廓。
如果有人可以帮助我,我将不胜感激,我会在工作中一遍又一遍地执行相同的过程,让它自动化将是最好的。
这是我目前所得到的(已修改为包括保存选项、插画版本和文件路径作为字符串):
set saveLocation to ((path to desktop) as string) --place to save the files
set theFile to choose file --choose .ai file to get outlines on
tell application "Finder" to set fileName to name of theFile
set fullPath to (saveLocation & fileName) --file path of new .ai
set olPath to fullPath & "_OL.ai" --file path of new .ai with outlines
tell application "Adobe Illustrator"
activate
open theFile without dialogs
save current document in file fullPath as Illustrator with options {class:Illustrator save options, compatibility:Illustrator 15, font subset threshold:0.0, embed linked files:true, save multiple artboards:false} --save file to desktop
selectobjectsonactiveartboard --select all
convert to paths --convert all text to outlines
display dialog "pause"
save current document in file olPath as Illustrator with options {class:Illustrator save options, compatibility:Illustrator 15, font subset threshold:0.0, embed linked files:true, save multiple artboards:false} --save another copy to desktop with name + _OL.ai
quit
end tell
【问题讨论】:
-
你编码的 Ai 版本是什么?
-
这是 Adobe Illustrator CS5.1
-
查看我的更新。使用别名时,更改它们时将它们设为字符串
-
我在上面看到的唯一问题是 Illustrator 15 需要在兼容性之后:在 {} 内。你以前有过。保存行应如下所示:“将文件 olPath 中的当前文档保存为 Illustrator 选项 {class:Illustrator 保存选项,兼容性:Illustrator 15,字体子集阈值:0.0,嵌入链接文件:true,保存多个画板:false}”
-
感谢您的帮助,它现在正在保存,不幸的是现在它正在保存我了解到它不喜欢“全选”命令-_-
标签: applescript adobe-illustrator