#!/usr/bin/osascript
on convertListToString(theList, theDelimiter)
    set AppleScript's text item delimiters to theDelimiter
    set theString to theList as string
    set AppleScript's text item delimiters to ""
    return theString
end convertListToString

on run argv
	set output to {}
	tell application "Finder"
		set selectedItems to selection as alias list
		repeat with i from 1 to count of selectedItems
			set end of output to quoted form of POSIX path of item i of selectedItems as string
		end repeat
	end tell
	return convertListToString(output, "\n")
end run
