Cast AppleScript paths to text
This commit is contained in:
parent
00e12b7a98
commit
b8bb51d7b5
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
osascript 2>/dev/null <<EOF
|
osascript 2>/dev/null <<EOF
|
||||||
tell application "Finder"
|
tell application "Finder"
|
||||||
return POSIX path of (target of window 1 as alias)
|
return POSIX path of (target of first window as text)
|
||||||
end tell
|
end tell
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -5,14 +5,11 @@
|
|||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
osascript 2>/dev/null <<EOF
|
osascript 2>&1 <<EOF
|
||||||
set output to ""
|
|
||||||
tell application "Finder" to set the_selection to selection
|
tell application "Finder" to set the_selection to selection
|
||||||
set item_count to count the_selection
|
if the_selection is not {}
|
||||||
repeat with item_index from 1 to count the_selection
|
repeat with an_item in the_selection
|
||||||
if item_index is less than item_count then set the_delimiter to "\n"
|
log POSIX path of (an_item as text)
|
||||||
if item_index is item_count then set the_delimiter to ""
|
|
||||||
set output to output & ((item item_index of the_selection as alias)'s POSIX path) & the_delimiter
|
|
||||||
end repeat
|
end repeat
|
||||||
|
end if
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user