>"Eric Schult" wrote: > >> I'm having trouble inserting .gif thumbnails into a container >>field in FM P6. >> I can manually Insert/Picture and select a specific .gif file, but can't >> figure out the syntax of doing the same with applescript. I presume it's >> something like: >> >> tell application "filemaker pro" >> tell document 1 >> tell current record >> set cell "preview" to alias "path:filename.gif" >> end tell >> end tell >> end tell >> >> ... but I get "Event not handled." with this attempt, and "wrong data typ e" >> if I try other variations. >> >> I have tried using open for access to read the contents of the .gif file and >> that fails, too. Couldn't find an answer in the FMP dictionary or elsewhe re >> on the list. Any help appreciated. >> >> -- WES > >"Bill Steele" wrote: > >> This works for me in Filemaker scripting steps: >> >> Go to field [Photo index::image] >> Insert picture ["temp.jpg"] >> >> When you add the Insert picture step you use a dialog to set the >> filepath. Your thumbnail always has to be in the same place, so this >> is preceded by an Applescript that puts it there. > > >Bill, that does work, but it's not AppleScript (as you said.) But, Eric >wanted to do this inside an AppleScript, so we'll need to find a different >solution. > >Eric, you're not alone in trying to figure out the proper kind of reference >(alias, file, etc.) to hand off to FileMaker, or many scriptable >applications, for that matter. > >In FileMaker -- you don't say what version you are using -- the answer is >that you should, with container fields by reference, had off a string. So, >drop the 'alias' from your sample. This may not be helpful in FM 7 +. > >So, in short, in FM _up to 7_ (and maybe including and beyond), one could >insert an image by reference simply by setting the container field's value >to the string path of the object to insert. > >HTH >-- >Gary I seem to remember adopting this method because I couldn't make it work in pure Applescript. One option, of course, is to use the "do script" command to have Filemaker run an internal script (Would that be incest?). I also have a vague recollection of getting something into a container field by pasting, but that was probably with FM 4. -- Bill Steele [log in to unmask]