Re: list of aliases
Re: list of aliases
- Subject: Re: list of aliases
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 27 Apr 2005 05:21:58 +0200
Le 27 avr. 2005 , à 2:05, Jim Brandt a écrit :
Can someone tell me why this line of code:
set theList to (every item of alias hold_folder whose kind is not "folder") as alias list
works if there are two or more files (non-folders) in hold_folder but fails if there is a single file in hold_folder.
Hello
Perhaps this may help:
version 1:
tell application "Finder"
try
set theList to (every item of alias hold_folder whose kind is not "folder") as alias list
on error
set tL to (every item of alias hold_folder whose kind is not "folder")
if (count of tL) = 0 then
set theList to {}
else
set theList to (tL's item 1) as alias
end if
end try
end tell
version 2:
tell application "Finder"
set theList0 to (every item of alias hold_folder whose kind is not "folder")
if theList0's class is not list then set theList0 to {theList0}
end tell
set theList to {}
repeat with a in theList0
copy a as alias to end of theList
end repeat
Yvan KOENIG _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden