Re: Coercing document list to alias list
Re: Coercing document list to alias list
- Subject: Re: Coercing document list to alias list
- From: has <email@hidden>
- Date: Tue, 12 Dec 2006 18:55:13 +0000
Mahlon Lovett wrote:
Hmmmm... doesn't work for me
tell application "Finder"
get the selection -- a selection of docs, images, whatever
tell (result)
if (count) = 1 then
set the_list to {it as alias}
else
set the_list to it as alias list
end if
end tell
--> return the_list
end tell
I still get a bunch of system file references rather than an alias
list...
That's because you're operating on an AppleScript value, not the
application object model. e.g. Compare:
tell application "Finder"
set some_reference to a reference to items of home whose name
starts with "d"
tell some_reference
if (count) = 1 then
set the_list to {it as alias}
else
set the_list to it as alias list
end if
end tell
--> return the_list
end tell
has
--
http://freespace.virgin.net/hamish.sanderson/
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden