Re: Alias list inconsistency ?
Re: Alias list inconsistency ?
- Subject: Re: Alias list inconsistency ?
- From: KOENIG Yvan <email@hidden>
- Date: Thu, 26 Jun 2008 10:52:07 +0200
Le 26 juin 2008 à 08:38, Jay Louvion a écrit :
Try this little snippet and please tell me there is a reason to
(what seems like) this nonsense.
tell application "Finder"
set ImageFiles to (every file of folder (choose folder))
if length of ImageFiles is 1 then
set ImageFiles to ImageFiles as alias
else
display dialog "There is more than one file."
set ImageFiles to (ImageFiles as alias list)
end if
end tell
The result when there are more than one file is not returned as an
alias list, but as a list of file references, Finder-style.
You met an old bug.
I don't know if it is the bay soluce but it works.
tell application "Finder"
set theFolder to (choose folder) as alias
set imageFiles to every file of theFolder
if length of imageFiles is 1 then
set imageFiles to imageFiles as alias
else
set imageFiles to (every file of theFolder as alias list)
end if
end tell
Yvan KOENIG (from FRANCE jeudi 26 juin 2008 10:51:56)
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden