Re: FMPro Image Import problem
Re: FMPro Image Import problem
- Subject: Re: FMPro Image Import problem
- From: JJ <email@hidden>
- Date: Tue, 12 Mar 2002 20:40:35 +0100
>
I'm working on an script to import thousands of images into an FMPro
>
database. I've got the script running well except for one small problem.
>
When the images are imported into the field it apparently only imports a
>
reference. When the Windows users open the database they see nothing
>
although the Mac users see all.
>
>
The syntax I'm using is:
>
>
tell application "FileMaker Pro"
>
set new_record to create new record in database the_database
>
set cell the_picture of new_record to file path_name
>
set cell the_name of new_record to path_name
>
end tell
>
>
I'm new to FMPro scripting. Is there a way to actually import the picture
>
file directly into the database? I know it will make a huge file but that's
>
ok. We found if we use the Import command from the menu it imports
>
correctly. I've tried using the "do menu" command but I'm not getting the
>
syntax right at all.
Seems there isn't so much FM applescripters at this time; so, I'll try it:
With your script, in fact, you are importing into your DB only a reference.
If you request "cellValue" of cell the_picture, you'll get a file spec.
When you import the picture manually and request again "cellValue", you
receive the picture as raw data: <<data...>>.
Then, the quick way is using some third-party osax, such as Akua Sweets
("the image from" command), read the image, then import the data into your
DB (but imgs musn't be so long, or your script will get out of memory).
Also, you can create a ScriptMaker script within FM which will import the
images through FM AppleScript command "do script", but it is so tedious and
slowly.
Good luck!
JJ
_______________________________________________
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.