苹果脚本Droplet,用于将PSD和TIF文件转换为JPG。
这是AppleScript Droplet的代码示例:
on open theFiles
repeat with aFile in theFiles
tell application "Adobe Photoshop CC 2017"
set theDoc to open aFile as Photoshop document
set thePath to theDoc's path
set theName to theDoc's name
set docName to text 1 thru ((offset of "." & file extension of theName) - 1) of theName
set jpgPath to (thePath & docName & ".jpg") as string
save theDoc in jpgPath as JPEG with options {class:JPEG options, quality:11}
close theDoc saving no
end tell
end repeat
end open
这个AppleScript Droplet可以将所有传递给它的PSD和TIF文件转换为JPG格式。要使用它,只需拖动需要转换的文件到Droplet上。转换后的JPG文件将位于相同的目录中,带有相同的文件名,只是扩展名不同。
为了确保此脚本按预期工作,您需要在计算机上安装Adobe Photoshop CC 2017。如果您使用其他版本,请相应地更改脚本中的'Adobe Photoshop CC 2017”部分。