Last active
December 11, 2015 21:59
-
-
Save ClarkGoble/4666805 to your computer and use it in GitHub Desktop.
Returns the paths of the selected Finder items quoted with a space between them. I use this with Keyboard Maestro to type the paths into the Terminal when I type ]finder there.
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" to set theSel to selection as alias list | |
set pathList to {} | |
repeat with anItem in theSel | |
set the end of pathList to quoted form of (POSIX path of (anItem as alias)) | |
end repeat | |
set savedDelimiters to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to " " | |
set myoutput to pathList as string | |
set AppleScript's text item delimiters to savedDelimiters | |
return myoutput |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is pretty cool. Thanks