Skip to content

Instantly share code, notes, and snippets.

@ClarkGoble
Last active December 11, 2015 21:59
Show Gist options
  • Save ClarkGoble/4666805 to your computer and use it in GitHub Desktop.
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.
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
@ff6347
Copy link

ff6347 commented Feb 24, 2013

This is pretty cool. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment