On 2/27/06, Eric Schult wrote:

> Setting the cell to the filepath as string didn't work for me in FMP6. I
> still would rather do this in AS, but if I can do it with a mix of AS and
> the built-in scripting language in FMP, I'm okay with that. I'll try it.
> Meanwhile, if anybody knows the syntax for inserting a picture file into a
> container field, I'd appreciate the help.

FileMaker 6 and before doesn't support the GIF format in containers (perhaps
to avoid patent issues with Unisys?). The code below works for older
versions of FileMaker. It uses the free GraphicsImporter osax by Hikaru Abe,
which is available here:
        http://osaxen.com/files/graphicsimporter2.2.html

tell application "filemaker pro"
   tell document 1
       tell current record
           set cell "preview" to giconvert alias "path:filename.gif"
       end tell
   end tell
end tell

The GIF file isn't actually stored. Rather, the "giconvert" does an
extremely quick conversion to PICT format, which FileMaker supports.
Additionally, the command offers a number of on-the-fly conversion options
including cropping, scaling, and resolution changing. While it's not "plain
vanilla" AppleScript, it does avoid FileMaker scripting.

Stan Cleveland
Color Technology Inc.
Portland, Oregon

"Difficulties increase the nearer we get to the goal." -- Goethe