Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Automation 使用Applescript在Photoshop中打开文件_Automation_Applescript_Photoshop - Fatal编程技术网

Automation 使用Applescript在Photoshop中打开文件

Automation 使用Applescript在Photoshop中打开文件,automation,applescript,photoshop,Automation,Applescript,Photoshop,我正在尝试使用Applescript在photoshop中自动执行任务 尝试打开文件时: tell application "Adobe Photoshop CS5" -- Open the first image set filePath to alias "Users:jameshale:Pictures:DSC_1273.jpg" with timeout of 5 seconds open filePath as Camera RAW end timeout end te

我正在尝试使用Applescript在photoshop中自动执行任务

尝试打开文件时:

tell application "Adobe Photoshop CS5"

 -- Open the first image
 set filePath to alias "Users:jameshale:Pictures:DSC_1273.jpg"
 with timeout of 5 seconds
  open filePath as Camera RAW
 end timeout

end tell
结果是一个错误:

error "Adobe Photoshop CS5 got an error: Can’t get alias \"Users:jameshale:Pictures:DSC_1273.jpg\"." number -1728
我做错了什么


-J

别名路径在根目录中包含HD名称。所以你需要把你的一行改成这个

// Replace Macintosh HD with your HD name 
set filePath to alias "Macintosh HD:Users:jameshale:Pictures:DSC_1273.jpg"