AppleScript - CopyPath.app
2017-05-31 本文已影响0人
成江海
CopyPath.app
tellapplication"Finder"
setseltotheselection
if(countofsel)isgreater than1then
settheListto""
repeatwitheinsel
settheListtotheList&POSIX pathof(eastext) &return
endrepeat
set the clipboard totheList
elseif(countofsel)isequal to1then
set the clipboard toPOSIX pathof(selastext)
else
set the clipboard toPOSIX pathof(targetofwindow1asalias)
endif
endtell