Newbies Jave Posted March 20, 2003 Newbies Posted March 20, 2003 Hi everybody, I wanna insert pictures in FM database via AppleScript, but not the reference of the file. I know the database is going to be heavy, but I really need having the picture in the database and not its reference. I made an AppleScript (see code below), but it only store the reference of the picture. What can I do and how can I modify my AppleScript to insert the picture and not its reference. Thanks for your help Jave Code of my AppleScript tell application "Finder" set finalFolder to "Macintosh:Utilisateurs:jave:Bureau:Images" repeat with x from 1 to (count of every item of folder finalFolder) set mapPart to item x of folder finalFolder set partName to name of mapPart tell application "FileMaker Pro" activate tell document 1 set currentRecord to create new record tell currentRecord set cell "Image" to file (mapPart as string) set cell "NomFichier" to partName set cell "Ville" to "Basel" end tell end tell end tell end repeat end tell
Chuck Posted March 20, 2003 Posted March 20, 2003 When I recently wrote an AppleScript to import a folder of images, I handled it differently. AppleScript looped through each file in the folder. For each one, it made a copy in a known location and called it image.jpg. FileMaker then used the Insert Picture command to import image.jpg into the correct field. The next time through the loop, image.jpg held the next file in the folder. Chuck
jfmcel Posted March 24, 2003 Posted March 24, 2003 There are others ways to do this but I recommend using the giconvert command from the GraphicsImporter scripting addition. You can get the scripting addition at http://osaxen.com/graphicsimporter.html After you download the addition, place it in the scripting additions folder in the system folder. The syntax is something like... set theImageData to giconvert theImageAlias tell app "FileMaker Pro" to set cell "Image" to theImageDate
Recommended Posts
This topic is 8284 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now