我正在尝试为 Photoshop 编写一个 Applescript droplet,它可以调整多张照片的大小和水印。我想捆绑水印图像并保存为应用程序,以便我可以在我的组织内分发它,但我似乎无法让脚本查看捆绑的资源。
我将“watermark.png”图像拖到“Bundle Contents”侧边栏,并使用以下文件处理语句:
on process_item(this_item)
set myPath to alias this_item as text
tell application "Adobe Photoshop CS5.1"
open file myPath
set thisDocument to current document
set ruler units of settings to pixel units
resize image thisDocument width 640
set wmPath to path to resource "watermark.png"
open file wmPath
end tell
end process_item
但我总是收到以下错误:
Resource not found.
我必须做一些特别的事情来确保脚本可以找到捆绑的资源吗?