2011-01-19 110 views
0

我想使用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 tell 

結果是錯誤的:

error "Adobe Photoshop CS5 got an error: Can’t get alias \"Users:jameshale:Pictures:DSC_1273.jpg\"." number -1728 

我在做什麼錯?

-J

回答

0

別名路徑包括在根目錄中的HD名稱。所以你需要把你的一條線改成這個

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