Skip to content

Instantly share code, notes, and snippets.

@hishma
Created July 13, 2011 15:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hishma/1080497 to your computer and use it in GitHub Desktop.
Save hishma/1080497 to your computer and use it in GitHub Desktop.
View an Aperture photo on flickr
-- View an Aperture photo on flickr
-- Assumes a custom metadata field in Aperture named "Flickr URL" exists.
tell application "Aperture"
-- selection always returns image versions
set selectedImages to (get selection)
if (count of items in selectedImages) > 0 then
repeat with i from 1 to count of selectedImages
tell library 1
set img to item i of selectedImages
if custom tag "Flickr URL" of img exists then
set flickrURL to value of custom tag "Flickr URL" of img
open location flickrURL with error reporting
else
log ("The selected image has no flickr URL")
display dialog "The selected image has no flickr URL"
end if
end tell
end repeat
else
log ("Oops... Nothing selected!")
display dialog "Oops... Nothing selected!"
end if
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment