Newbies Wayne@Cornerstone Posted September 10, 2005 Newbies Posted September 10, 2005 Need to choose a picture from iPhoto to enter into a container field. Need to intergrate iPhoto with FileMaker 7.
Fenton Posted September 11, 2005 Posted September 11, 2005 (edited) Applescript? I've not done much with iPhoto. But I whipped up this AppleScript, which will get either the current selection, if any, or the entire current album of iPhoto, as an AppleScript list of files. You could alternatively not do the whole album, and put up a dialog, if that's too many to deal with (I have only a few photos there, just for testing). You would then have to do something with them, such as duplicate each to a known location to Insert into FileMaker. iPhoto seems to return the "image path" as a POSIX (Unix syntax) path. Kind of awkward for AppleScript. So I changed it back to a Mac path, which is what the Finder uses. -- Returns the current selection,if any, or the current album as a list global thePhotos property macPaths {} tell application "iPhoto" set thePhotos to the selection if item 1 of thePhotos is current album then -- there's no selection, do the whole album set thePhotos to photos of current album my parseItems(thePhotos) else -- there's a selection if length of thePhotos = 1 then set posPath to image path of (item 1 of thePhotos) tell me to set macPaths to POSIX file (posPath) else my parseItems(thePhotos) end if end if return macPaths end tell on parseItems(aList) using terms from application "iPhoto" repeat with i in thePhotos set posPath to image path of i tell me to set macPath to POSIX file (posPath) set macPaths to macPaths & macPath end repeat end using terms from end parseItems Edited September 11, 2005 by Guest
Recommended Posts
This topic is 7011 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