【发布时间】:2019-08-08 11:12:38
【问题描述】:
我正在尝试编写一个自动创建文件的代码。我需要将另一个 psd 文件作为单独的层插入到程序正在创建的层中。我还需要调整插入文件的大小和位置。插入的文件是 psd。我目前在 photoshop-cc15 工作。我在 AppleScript 中工作,也需要 AppleScript 中的解决方案。我也在 Photoshop CC15 中工作
我已尝试加载和打开命令,但由于某种原因 photoshop 看不到该文件。文件的路径我检查了很多遍,肯定是正确的。
tell application "Adobe Photoshop CC 2015"
-- Create a new document.
set docRef to make new document with properties ¬
{width:5 as inches, height:6 as inches, resolution:300}
tell docRef
-- Unlock the background layer and fill it with gray color
set background layer of layer 1 of docRef to false
fill selection with contents {class:RGB color, red:200, green:200, blue:200}
-- Insert the first diamond into the file
set myPath to alias ¬
"Macintosh HD/Users/tikhonpachin/Documents/Work/VK/Word of the Day/Diamond.psd"
load myPath
end tell
end tell
预期的结果是一个钻石作为一个单独的图层插入我的画布中。菱形是我要插入的文件。我还需要知道如何调整其属性,例如与其他图层相关的画布上的高度、宽度和位置。非常感谢您!
【问题讨论】:
标签: file applescript alias photoshop layer