图像插画家的自动化 importing/sizing

Automated importing/sizing of image illustrator

我正在尝试找到一种使用 AppleScript 将图像放入 Illustrator 文档的方法,但我找不到有效的放置图像命令。

理想情况下,我会给 AppleScript 我的图像文件路径,它会在执行时将所述图像放入文件中。

以前有人这样做过吗?

你有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