Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Cannot open a file by Applescript

$
0
0

With Photoshop CS6, I am getting an error trying to open a file. This breaks a few of my scripts which continue to work with CS5.

 

This code, copied almost exactly from the CS6 Applescript Reference, returns

 

error "Adobe Photoshop CS6 got an error: File some object wasn’t found." number -43

 

Passing myFilePath to Finder works perfectly fine to open the alias.

 

tell application "Adobe Photoshop CS6"

          set myFilePath to alias "Macintosh HD:Users:ats:Downloads:Photoshop-CS6-AppleScript-Ref.pdf"

          tell application "Finder"

  openmyFilePath

          end tell

  openmyFilePathasPDFwith options {class:PDF open options, height:pixels 100, width:pixels 200, mode:RGB, resolution:72, use antialias:true, page:1, constrain proportions:false}

end tell


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>