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:
Bruce Robertson <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 28 Feb 2006 16:46:03 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
> I'm having trouble inserting .gif thumbnails into a container field in FMP6.
> 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 type"
> 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 elsewhere
> on the list. Any help appreciated.
> 
> -- WES

From the "Import Picture Applet" which comes with the Filemaker Apple Events
database that comes with FileMaker 6:

tell database "Picture Database"
  set newRecord to create record
  go to newRecord
  set cell "Name" of newRecord to pictureFileName
  set cell "Picture" of newRecord to file (pictureFileRef)
end tell

ATOM RSS1 RSS2