i like to be able
to get to the actual files on the HD as well as
through the program, but i understand that's a big
no-no with iphoto.
The applecript "Show Image File" will switch to the finder and locate the currently selected photo in iPhoto. (But yeah, iPhoto will get confused if you edit it outside of iPhoto.)
http://www.apple.com/applescript/iphoto/
tell application "iPhoto"
activate
try
copy (my selected_images()) to these_images
if these_images is false or (the count of these_images) is not 1 then ¬
error "Please select a single image."
set this_image to item 1 of these_images
set this_imagefile to ((image path of this_image) as POSIX file) as alias
on error error_message number error_number
if the error_number is not -128 then
display dialog error_message buttons {"Cancel"} default button 1
end if
end try
end tell
tell application "Finder"
activate
set visible of (every process whose visible is true and frontmost is false) to false
reveal this_imagefile
end tell
on selected_images()
tell application "iPhoto"
try
-- get selection
set these_items to the selection
-- check for single album selected
if the class of item 1 of these_items is album then error
-- return the list of selected photos
return these_items
on error
return false
end try
end tell
end selected_images
Mac OS X (10.4.3)