Re: Export Image From FileMaker
Re: Export Image From FileMaker
- Subject: Re: Export Image From FileMaker
- From: kai <email@hidden>
- Date: Wed, 12 Nov 2003 23:56:20 +0000
on Mon, 10 Nov 2003 18:29:56 +0000, Simon Forster wrote:
>
I've been given a FileMaker Pro database which has got images in a
>
container field and I need to get the images out of FileMaker and saved
>
as pics. I had hoped that I could get the pic data (which appears to be
>
of type pict) and just write it to a file - but this doesn't seem to
>
work - at least graphic converter doesn't recognise the subsequent
>
file.
>
>
So how do I do this?
>
>
I've Googled; I've searched archives; I've checked FileMaker's web site
>
and I can't find any way of doing this without a Plugin.
>
>
Please, someone must know the answer.
>
>
TIA (from someone who's giving up on the day)
Late to the party (as usual). I see the PICT header approach has already
been mentioned but, in case it helps more specifically, I just dug out this
old script - which obviously needs modifying in the appropriate places:
-------------------------------------------------------
(Any wrapped lines abutting the left edge of the window
should be reconnected to the end of the previous line)
-------------------------------------------------------
--========
script s
set o to ASCII character 0
repeat 9 times
set o to o & o
end repeat
o
end script
property h : run script s
global p
to exportPic(n)
tell application "FileMaker Pro"
tell database "FMP Pics" to tell record n to set v to cell "pic"
end tell
tell {{v:v}} as string
if (count) < 47 then return
set d to h & text 47 thru -1
end tell
tell application "Finder" to set f to (make new file at p with
properties {name:"Pict-" & n, file type:"PICT"}) as alias
write d to f
end exportPic
set p to choose folder with prompt "Please make/choose a folder for the
exported files"
tell application "FileMaker Pro"
tell database "FMP Pics" to set e to count records
end tell
repeat with n from 1 to e
exportPic(n)
end repeat
--========
If the 'exported' files are to be placed in a folder already containing
files, there's a chance of an error caused by filename conflicts. You'll
need to either trap this - or always make/choose an empty folder.
---
kai
_______________________________________________
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.