Re: exporting container fields in FMP
Re: exporting container fields in FMP
- Subject: Re: exporting container fields in FMP
- From: Gary Lists <email@hidden>
- Date: Wed, 11 Jun 2003 18:24:34 -0400
On or about 6/11/03 4:50 PM, Kevin Carter wrote:
>
On Wednesday, June 11, 2003, at 03:07 PM,
>
email@hidden wrote:
>
>
> 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.
>
>
Yes, it's possible, provided that the applescript is executed outside
>
of FMP (i.e., not within a ScriptMaker call).
>
>
it looks something like this:
>
>
tell app "filemaker pro"
>
set newFileName to get data of cell "fooText" of current record of
>
database "fooFile"
>
set newFileData to get data of cell "fooContainer" of current record of
>
database "fooFile" -- as data
>
end tell
>
>
set fileSession to open for access file ((path to desktop) as string) &
>
newFileName with write permission
>
set eof fileSession to 0
>
write newFileData to fileSession
>
close access fileSession
I don't see any reason why this could not run from within FM, but I would
point out that this will _not_ work if the field does not have 'data' but
rather a 'file specification'.
If 'fooContainer' holds 'file "HD:Documents:Images:myimage.jpg"' (which it
would if the image were inserted 'as reference') then this will not work as
expected.
Also, the OP wanted to create JPG image, which this will not accomplish.
The 'data' -- if it exists as such -- will be returned as something like
this:
<<data PICT1F2C4800....>>
HTH
--
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.