【发布时间】:2023-03-30 04:20:01
【问题描述】:
我在这里写了一个非常非常简单的脚本小滴。运行操作后,我使用它将 PDF 转换为 jpg。我只是将 PDF 拖到 droplet 上。
完成后,不会保存任何文件。曾经。我尝试过 POSIX,引用形式,从服务器保存,从我的桌面保存,不同的语法......没有任何效果。无论我做什么,Photoshop 都不会保存该死的文件。我什至从指南中复制了完全相同的代码,但它不起作用。
on open myItems
repeat with thisItem in myItems
tell application "System Events"
set targetFolderPath to path of container of disk item (thisItem as text)
end tell
tell application "Adobe Photoshop CS6"
set display dialogs to never
open thisItem as PDF with options ¬
{class:PDF open options, mode:RGB, resolution:180, use antialias:true, crop page:crop box}
set myDoc to name of current document
set filePath to targetFolderPath & myDoc & ".jpg"
do action "MyAction" from "Default"
save in file filePath as JPEG with options {quality:12}
close the current document saving no
end tell
end open
【问题讨论】:
标签: applescript photoshop