Last active
October 22, 2015 06:52
-
-
Save troutcolor/75edebf090305b1d70c1 to your computer and use it in GitHub Desktop.
Apple Script to find where a flickr photo (or photos) selected in the finder comes from. See http://cogdogblog.com/2015/10/21/flickr-trickr/ I use FastScripts to run this sort of thing.
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
tell application "Finder" | |
set files_ to selection | |
repeat with file_ in files_ | |
set imgkind to (kind of file_) | |
repeat 1 times | |
set imgkind to (kind of file_) | |
if (imgkind does not contain "Image") then | |
exit repeat -- 1 times | |
end if | |
set filename to name of file_ | |
set AppleScript's text item delimiters to {"_"} | |
set theid to first text item of filename as string | |
do shell script ("open http://flickr.com/photo.gne?id=" & theid) | |
get theid | |
end repeat | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment