Jump to content
Server Maintenance This Week. ×

This topic is 6812 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 :P {}

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 by Guest
Link to comment
Share on other sites

This topic is 6812 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.