Applescript Droplet-在Photoshop CS6中打开文件

Applescript Droplet-在Photoshop CS6中打开文件,applescript,photoshop,Applescript,Photoshop,我正在用Applescript创建一个水滴,它基本上会在PhotoshopCS6中打开文件,然后处理它 到目前为止,我无法通过打开文件位。是否有人能识别此代码的错误: on open {the_PDFs} set myFilePath to the_PDFs tell application "Adobe Photoshop CS6" open myFilePath as PDF with options {class:PDF open options, mode:RGB, r

我正在用Applescript创建一个水滴,它基本上会在PhotoshopCS6中打开文件,然后处理它

到目前为止,我无法通过打开文件位。是否有人能识别此代码的错误:

on open {the_PDFs}

set myFilePath to the_PDFs

tell application "Adobe Photoshop CS6"
    open myFilePath as PDF with options {class:PDF open options, mode:RGB,    resolution:300, page:x, constrain proportions:false}
end tell

end open

我不断收到一个错误,说无法获取别名Macintosh HD:Users:MyName:Desktop:myFile.pdf

将括号从第一行中移开,它应该可以工作:

on open the_PDFs
好的,有几件事

不确定为什么要使用括号,但需要删除这些括号

接下来,_pdf是一个文件数组,而不是一个文件,因此必须循环遍历它们

最后一次你告诉它打开x页,但永远不要定义x

on open the_PDFs
    set x to 1
    repeat with afile in the_PDFs
        tell application "Adobe Photoshop CS5.1"
            open afile as PDF with options {class:PDF open options, mode:RGB, resolution:300, page:x, constrain proportions:false}
        end tell
    end repeat
end open
注意:我没有CS6,所以我不能在CS6中测试,尽管这方面不应该有任何变化