AnsweredAssumed Answered

Mac OS Yosemite not getting field info

Question asked by KelvinAitken on May 12, 2015
Latest reply on May 13, 2015 by KelvinAitken

Title

Mac OS Yosemite not getting field info

Post


Just upgraded to a new laptop from OS X 10.8 to OS X Yosemite. Using the same version of Filemaker Pro Advanced 12. Some scripts no longer work. For example, a script that finds the path of an image and opens that image in Photoshop comes up with an error.

Script that used to work on old OS X:

tell application "FileMaker Pro Advanced"
    set myPicture to cell "Picture" of the current record of document "Photos" as alias
set myPicture to myPicture as string
tell application "Adobe Photoshop CS6"
        activate
        open file myPicture
    end tell
end tell

=========

On running the old script using Script Editor I get an error on the alias function. I get:

tell application "FileMaker Pro Advanced"
    get cell "Picture" of current record of document "Photos"
Result:
error "FileMaker Pro Advanced got an error: Apple events or Macintosh system error: -35" number -35
===========

I changed the "alias" to "string" and put in a "display dialog" step to see what it was coming up with and got:

tell application "FileMaker Pro Advanced"
    get cell "Picture" of current record of document "Photos"
    display dialog "size:640,290image:My Images/Birds/B10 65966.jpgimagemac:/Macintosh HD/Users/BradPitt/Desktop/My Images/Birds/B10 65966.jpg"
end tell
tell application "Adobe Photoshop CS6"
    activate
    open file "size:640,290image:My Images/Birds/B10 65966.jpgimagemac:/Macintosh HD/Users/BradPitt/Desktop/My Images/Birds/B10 65966.jpg"
Result:
error "Adobe Photoshop CS6 got an error: File some object wasn’t found." number -43
==========

So, looking at the "open" bit, it seems that Yosemite is putting in pixel dimensions, partial path and weird stuff in the path:

open file "size:640,290image:My Images/Birds/B10 65966.jpgimagemac:/Macintosh HD/Users/BradPitt/Desktop/My Images/Birds/B10 65966.jpg"

Any suggestions? 

Outcomes