MACSCRPT Archives

February 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Cleveland <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 27 Feb 2006 22:26:09 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
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

ATOM RSS1 RSS2