| 1 | #!/usr/bin/osascript |
| 2 | on convertListToString(theList, theDelimiter) |
| 3 | set AppleScript's text item delimiters to theDelimiter |
| 4 | set theString to theList as string |
| 5 | set AppleScript's text item delimiters to "" |
| 6 | return theString |
| 7 | end convertListToString |
| 8 | |
| 9 | on run argv |
| 10 | set output to {} |
| 11 | tell application "Finder" |
| 12 | set selectedItems to selection as alias list |
| 13 | repeat with i from 1 to count of selectedItems |
| 14 | set end of output to quoted form of POSIX path of item i of selectedItems as string |
| 15 | end repeat |
| 16 | end tell |
| 17 | return convertListToString(output, "\n") |
| 18 | end run |
| 19 |
Rich / active-finder
Last active 1 hour ago
Get selected items in active Finder window