Re: Coerce to 'alias list'
Re: Coerce to 'alias list'
- Subject: Re: Coerce to 'alias list'
- From: Walter Ian Kaye <email@hidden>
- Date: Tue, 20 Jan 2004 19:57:14 -0800
At 07:18p -0800 01/20/2004, Walter Ian Kaye didst inscribe upon an
electronic papyrus:
How would you get a list of aliases from a selection?
OK, I've just tested this on both 7.6.1 and 10.2.8, and with 0, 1,
and multiple items selected:
GetFinderSelection()
on GetFinderSelection()
set selItems to {}
tell application "Finder"
copy selection to theSel
set selCount to count theSel
if selCount > 1 then
if (computer "sysv") > 4096 then
repeat with i from 1 to selCount
set end of selItems to (item i of theSel) as alias
end repeat
else --do the -1700 thang for 7/8/9
try
set selItems to {selection as alias}
on error number -1700 from f
set selItems to f
end try
end if
else if selCount = 1 then
set selItems to {selection as alias}
else
--already set selItems to {} at top
end if
end tell
selItems
end GetFinderSelection
-boo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.