我正在尝试找到一种使用AppleScript将图像放置到插图文档中的方法,但是找不到有效的放置图像命令。
理想情况下,我将为AppleScript提供图像的文件路径,并在执行该图像时将其放置在文件中。
有人做过吗?
答案 0 :(得分:1)
您有Adobe Illustrator CC 2017 Reference PDF吗?这个例子很简单:
-- This function adds a new placed item to a document from a file reference,
-- fileToPlace, which is passed in during the function call, fileToPlace is an
-- alias or file reference to an art file, which must be set up before calling this
-- function, itemPosition is a fixed point at which to position the placed item
on PlacedItemCreate(fileToPlace)
tell application "Adobe Illustrator"
set itemPosition to {100.0, 200.0}
set placedRef to make new placed item in document 1 ¬
with properties {file path:fileToPlace, position:itemPosition}
end tell
end PlacedItemCreate