Created
July 13, 2011 15:16
-
-
Save hishma/1080497 to your computer and use it in GitHub Desktop.
View an Aperture photo on flickr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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