This works for me, in FileMaker 10 and 11.
setpicto "Macintosh HD:Users:fej:Pictures:ART:Bouguereu:kiss.jpg"
tellapplication "FileMaker Pro Advanced"
setcell "pictureCon" ofcurrent recordtofilepic
But what does not work is if I compile and run it in an AppleScript from outside FileMaker in 10. Then open FileMaker 11 and try to run it, or visa versa (even with the other app closed). Because AppleScript seems to remember which app it was compiled for, and insists on it.
You might try copying the guts of the AppleScript out of the Perform AppleScript step, pasting it into a new one, and see if that works.
Another thing that sometimes helps when things like this go wrong is to separate the script slightly. Get the path to the file in one line, then set the container in another, rather than trying to do both at once. FileMaker seems especially touchy about this. I usually set the FileMaker data into a variable before doing anything else with it.
Thanks for your suggestion.
I will try it as soon as I can and let you know how it goes.
OK, it works!
Thanks for your answer.
What didn't work any longer was the "tell current record ... end tell" statements.
So I changed the original faulted script:
tell current record of document "Foto Mobili"
set data of cell "Foto" to file (cell "Path di Foto" as text)
set cell "Foto" of current record to file (cell "Path di Foto" of current record as text)
This seems to work fine
Thanks again! I've been trying to solve it for days... now it is working thanks to you.