Jim McNeely wrote [4/14/05 11:31 AM]:

> I'm using FM7 on OS 10.3; The RM file is being served and used over the
> network.
> 
> Does anyone know of a way FROM APPLESCRIPT to grab the file contents of
> a container field, not using FM's export field contents script step, to
> put in a specific location on the local HD?

Hi Jim.

It is not entirely clear what "grab the file contents of a container field"
means. One could grab the 'container field contents', which could either be
a string, if a container were filled by reference, or some binary data if it
contains an actual file, which may no longer exist on the file system)

On the other hand, you could mean that, if the container field were set by
reference, with the actual original image on the file system, then the
container field will display an image, but contain a file path, as string.
You could, then, as is quite common, go and get, via AppleScript, the
"contents of the file".

They are different, and both are possible with AppleScript.

Rather than make a lengthy post, you can go and download wide-open working
demo files for just this thing.  They are in '.fp5' format.

There are three specific demos related to this topic that you might find
useful, particularly the first and second listed here:

1.  Inserting Images by Reference with AppleScript - Opening Images
(.sit.hqx) [5 k]

Use AS to locate and insert references to images stored on a drive.
Demonstrates techniques for opening an image in the Finder from the inserted
reference path.
See 'FileMaker Field Reporter' (below) for useful scripts for performing
tests on Container Field content to determine if an image is actually
embedded in the file or if it is included by reference.


2. AppleScript Insert File Path / Open File from Path
(.sit.hqx) [8 k]

Use AppleScript to insert a file path into a text field. Use the text field
path to locate and open the file item in the Finder. Can be used for image
browsing/launching for for launching any kind of file from within FileMaker.


3. FileMaker Field Reporter v1.0
(.sit.hqx) [12 k]

A Field Data browser test tool for AppleScript. Run the script with any data
file open, and you are presented with a list of every field in your data
file (or the current layout). You choose a field and some AppleScript Class
information about the field is shown. Shows name of field, cell value
(except for container fields), class of cell value (text, picture/quicktime,
sound), class of field, class of cell, best type class of cell, best type
class of field.


(Note:  Some of the info reported from field reporter is not very
interesting or revelatory. However, when I needed to see just this sort of
junk, this was what I used.)


You can get them all from here:
<http://nichecrafters.com/NicheTech/downloads.html#FileMaker>

I hope that helps. Best,
--
Gary


--
To unsubscribe: send an email to <[EMAIL PROTECTED]>
FMPexperts is hosted by Ironclad Networks <http://www.ironclad.net.au/>

Reply via email to