Re: FileMaker - Save contents of Container (JPEG)
Re: FileMaker - Save contents of Container (JPEG)
- Subject: Re: FileMaker - Save contents of Container (JPEG)
- From: Gary Lists <email@hidden>
- Date: Wed, 11 Jun 2003 18:16:55 -0400
On or about 6/11/03 10:34 AM, Steve Savery wrote:
>
Hi Group!
>
>
Many thanks to everyone who has helped me learn so much about
>
AppleScript. I've been putting all your advice to great use!
>
>
Now onto my current question...
>
>
I would like to save the contents of a container field to disk with the
>
filename being provided from another field. From what I can tell there
>
is no way to save the contents of a container. Hope I'm wrong.
AppleScript can do that...but...
>
Any ideas? I've played a lot with FileMaker - got it to clean out our
>
EPS file list by asking FileMaker to compare which adverts were active
>
with filenames listed on our file-server. Worked a treat! Saves us
>
about two hours each week.
>
>
TIA for any help.
>
>
>
Steve
Hello Steve.
In general, the discussion of doing what you wish -- save an image from FM
as a JPEG -- would probably run off topic in this list.
First off, it helps to know which version of FM you are using. Second off,
when one says 'save the contents of a container field' that is not specific
enough. See, in FileMaker, you can use a container field in two ways, with
an impact on the class of the data stored there.
One way, not always the best _and_ not always bad, is to store the actual
image in the container field. You could then delete the image from your
drive and it would remain "in" the field. This is called, in FileMaker
parlance, "Insert Image". The actual 'data' in the field is a long string
of PICT data, in this case. The class is 'picture'. You would need to use
another resource (via AppleScript is fine) to convert that into a JPEG, just
like you would any other conversion.
A second way is to use the 'store as reference' option for container fields,
in which case, as you can guess, only a reference is used. This is
available through the UI when a user (or a script) triggers an 'Insert' when
the target container field is active. There is a tic box at the bottom of
the standard Nav Services dialog to 'Include only a reference to the file'
or similar language.
It is important to remember that, in this case, the "data" in the field is
actually a file specification. (Unfortunately, and further confounding
efforts, it is not an alias reference, but a file reference.)
Okay, so, the way in which the 'container object' was 'inserted' matters.
If all of your images are inserted, as references to the file, then
essentially your script doesn't really "need" FM to do any work -- just to
provide the file spec and to provide the desired file name. You can use any
number of freeware or shareware tools (even QT) to do the conversion for you
-- I will leave issues of 'lossy' conversions to you.
I would recommend that you go and download my little "get your head around
this" tool, called FileMaker Field Reporter, which will let you experiment
with information returned via AppleScript when you "get" a field value that
is a container.
If none of this makes sense, sorry. It's probably a combination of my own
technical writing skills and the FileMaker mechanism of storing container
objects ... (not to fault them too much, they have to consider
cross-platform issues as well...be sure to check "store compatible graphics"
if any user will ever view the data from WinFM.)
You can download Field Reporter from here:
<
http://www.NicheCrafters.com/NicheTech/downloads.html>, in the FileMaker
section.
Also, you may want to (even if temporarily) check in at the FMPRO-L list,
where you will find several experts on FM.
--
Gary
MacOS 9.1 / "9 is Fine"
OMM: osa:AS 183 / osa:JS 103 / FM 55 / BB601 / Smile 188
______________________________________________________________
Please reply directly to the list.
Incoming messages are auto-deleted. (It's anti-spam, that's all.)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.