Re: FileMaker Pro 7-8: Getting Files into Containers
Re: FileMaker Pro 7-8: Getting Files into Containers
- Subject: Re: FileMaker Pro 7-8: Getting Files into Containers
- From: "Gary (Lists)" <email@hidden>
- Date: Tue, 13 Sep 2005 00:53:12 -0400
"Jason Bourque" wrote:
> I have this script working for getting jpg's into FMP8 database.
> But this only references the file. I want the file to be in the container
> field. How can this be done?
>
> set contents of cell "Thumbnail" to file vLargeThumbNail
I don't believe this has changed in FM8, but my response may be stale. (I
don't ever plan to upgrade FM given the molasses pace of their development.
Finally FM7 brought features about 5 years too late.)
But...the container question.
'set contents' has always inserted a proxy copy of the image and masked the
class of the field as text (the path).
"I have a script" isn't all that clear really, because an AppleScript could
approach this task in several ways.
If you don't mind the notion of fiddling with binary data (the class of a
container that has an _embedded_ image...like you want...will be «data PICT»
(or other), the class of the data itself (not the FM field object) will be
«class PICT» (or other.)
You want to explore the dictionary for 'set data' and not just 'set' ...
they are different verbs.
However, a much easier way -- and a way that allows FM to handle a task it
can do well, namely insert file data -- is to write a one-liner _FileMaker_
script that uses the 'Insert' (or whatever it's actually called ;) script
step. This is the normal FM script step that does what you want, and where
you can set any options that that script step allows (including the field,
if you want to hard-set that.) Name your script something like
_[sub]InsertImage or whatever.
Then, in your AppleScript, use the 'Do FileMaker Script' AppleScript
command, which takes that FM script name as its direct parameter, like:
tell current record to do filemaker script "_[sub]InsertImage"
I find that much more elegant, because FM already has its own means to
handle this task and your AS can take advantage of that. (Faster, too.)
HTH (and that it's not outdated by your use of FM8...if so...oops.)
--
Gary
_______________________________________________
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