Re: Export Image From FileMaker
Re: Export Image From FileMaker
- Subject: Re: Export Image From FileMaker
- From: kai <email@hidden>
- Date: Thu, 13 Nov 2003 00:58:07 +0000
on Wed, 12 Nov 2003 23:56:20 +0000, I wrote:
>
I just dug out this old script - which obviously needs modifying in the
>
appropriate places:
Did I mention it was an *old* script? ;-)
It works for me in OS 9 - but, due to a different data structure in OS X,
not there.
For a quick fix in OS X, try replacing this:
>
tell {{v:v}} as string
>
if (count) < 47 then return
>
set d to h & text 47 thru -1
>
end tell
...with this:
--========
tell {{v:v}} as string
if (count) < 63 then return
set d to h & text 63 thru -1
end tell
--========
Alternatively, this should work in either OS:
--========
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
set text item delimiters to "PICT"
set v to ({{v:v}} as string)'s text item -1
set text item delimiters to ""
if (count v) < 5 then return
set d to h & v's text 5 thru -1
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
--========
---
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.