• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Export Image From FileMaker
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Export Image From FileMaker


  • Subject: Re: Export Image From FileMaker
  • From: christian vick <email@hidden>
  • Date: Tue, 11 Nov 2003 17:51:13 +0100

> At 6:29 PM +0000 10/11/03, Simon Forster wrote:
>> Help. Please help.
>>
>> 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.
>>
>
> The AppleScript Reference Database recommends doing this via the
> clipboard. Boring but doable.

Not only boring, but also not save since the clipboard could change...

I just had today the same problem. In the past i've used clip2gif, a nifty
application which did a great job on this, but it's an OS 9 app and i want
to say goodbye to Classic...
I thought this job should be doable in OS X without third party stuff,
especially with QuickTime on board, but it doesn't seem to be possible. I
tried QuickTime Player and Image Capture Scripting, both didn't work.
Preview could do the job, but isn't scriptable :(

So, after some fiddling i got GC to work, watch for line breaks:


tell application "FileMaker Pro"
if (data size of cellValue of cell "Pict" of (record 1 of database
"PICT.FP5" whose cell "Record_ID" is thePictNumber)) is 0 then
set containsPictF to false
else
set thePicture to cell "Pict" of (record 1 of database "PICT.FP5"
whose cell "Record_ID" is thePictNumber)
set containsPictF to true
end if
end tell
if containsPictF then
set thePath to (theGraphicsFolder & thePictNumber & ".pict" as string) --
necessary to suffix it with .pict, otherwise GC will not recognize it.
set fref to (open for access file thePath with write permission)
set eof fref to 0
write thePicture to fref
close access fref

tell application "GraphicConverter" to open {thePath}

-- necessary to create the file before since GC doesn't create it:
set fref to (open for access file (theGraphicsFolder & thePictNumber &
".jpg" as string) with write permission)
set eof fref to 0
close access fref

tell application "GraphicConverter"
save window (thePictNumber & ".pict") in ,
alias (theGraphicsFolder & thePictNumber & ".jpg") as JPEG with
wwwready
close window (thePictNumber & ".jpg")
end tell
end if





Greetings
Christian
_______________________________________________
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.

  • Follow-Ups:
    • Re: Export Image From FileMaker
      • From: Gary Lists <email@hidden>
    • Re: Export Image From FileMaker
      • From: Simon Forster <email@hidden>
References: 
 >Re: Export Image From FileMaker (From: Malcolm Fitzgerald <email@hidden>)

  • Prev by Date: UI scripting (Bill) click acrobat pdf window
  • Next by Date: Re: weird UI scripting problems.
  • Previous by thread: Re: Export Image From FileMaker
  • Next by thread: Re: Export Image From FileMaker
  • Index(es):
    • Date
    • Thread