Skip to main content
Participant
November 6, 2012
Question

Can no longer open files using AppleScript on Mountain Lion (OS X 10.8)

  • November 6, 2012
  • 3 replies
  • 1915 views

While this bit of AppleScript works on Lion:

set myFilePath to "/Users/Shared/ENGR/sketch/Artists/daleb/16.0/New1/ANNIE_SUB_COMPLETE/31.5-058.psd"

tell application "Adobe Photoshop CS6"

  open alias myFilePath

end tell

It does not work on Mountain Lion. Instead I get an error:

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

I know that the syntax for opening a file changed with CS5, but I've been unable to find any reference to any changes required when moving to Mountain Lion.

What do I need to do here to get this to work on Mountain Lion?

This topic has been closed for replies.

3 replies

Participant
February 11, 2014

I was having a lot of trouble too. One mistake I seem to have had is the hyphen in the title of my document. That character, I believe, is not allowed. Your script actually WORKED for me and I had been struggling for quite a while! So thank you!

Participant
December 1, 2012

I'd try

set myFilePath to POSIX file "/Users/Shared/ENGR/sketch/Artists/daleb/16.0/New1/ANNIE_SUB_COMPLETE /31.5-058.psd"

tell application "Adobe Photoshop CS6"

  open alias myFilePath

end tell


Inspiring
November 7, 2012

I don't have mountain lion but the norm in applescript is to pass a HFS path ( colon delimited ). I suppose you could give this a try may do you until someone with newer software shows up…

tell application "Adobe Photoshop CS5"

          do javascript "app.open( File( '~/Desktop/testing.psd' ) );"

end tell