• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FileMaker 7 Container Fields
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FileMaker 7 Container Fields


  • Subject: Re: FileMaker 7 Container Fields
  • From: Malcolm Fitzgerald <email@hidden>
  • Date: Wed, 23 Mar 2005 10:01:41 +1100


On 22/03/2005, at 7:22 AM, Bruce Robertson wrote:

Hello Everyone,

I have seen scripts such as the one below for inserting JPEGS into FileMaker
6 container fields. Can any file type be inserted in a similar manner?
FileMaker 7 Container fields can now hold any file type so it would be nice
if I could use a similar technique with files like word docs, etc.


In short is there a way to read ANY file of the disk into Applescript and
then set it into a Container Field in FileMaker 7


Thanks for all your help.

Todd



--Script that works in 6 for images

set myJPEGFile to choose file
set myRef to open for access myJPEGFile
set myImage to read myRef as "JPEG"
close access myRef

tell application "FileMaker Pro"
      tell database 1
              tell record 1
                      set cell "Image" to myImage -- "Image" is a
container field
              end tell
      end tell
end tell


First of all your script can be simplified:


set myImage to read (choose file) as "JPEG"

I'm sure "JPEG" is not going to change but you may prefer to use the class name: JPEG picture, GIF picture, TIFF picture, picture.


set myImage to read (choose file) as JPEG picture


If you want to use a file reference, then it is easy enough but I do hope we
can figure out how to set the value of a container field NOT as a reference
and I don't know how to do this either yet.


The short answer to your question is "NO". Filemaker's applescript implementation cannot handle all file types. I'm sure this is a bug because it's easy to do manually. You may find a workaround for your current needs if you can go via the clipboard. This is really unsatisactory but the FMP applescript reference has been saying "use the clipboard" forever and it hasn't changed in v7.

A glimmer of hope, however, is that FMP's applescript implementation will accept PICT data. So, if you can transform your JPEG data to PICT you'll be able to store the image.



Malcolm Fitzgerald                       ph: 02 93180877
Database Manager                        fax: 02 93180530
The Australian Society of Authors      www.asauthors.org

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: FileMaker 7 Container Fields (From: Bruce Robertson <email@hidden>)

  • Prev by Date: Re: Antw: FileMaker Pro 5.5/OSX 10.3.8/QuickMqilPro 3.1
  • Next by Date: Print a quark file
  • Previous by thread: Re: Illustrator CS Text Frames
  • Next by thread: FileMaker Pro 5.5/OSX 10.3.8/QuickMqilPro 3.1
  • Index(es):
    • Date
    • Thread