• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: list of aliases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >list of aliases (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: list of aliases
  • Next by Date: Settings in Microsoft entourage
  • Previous by thread: Re: list of aliases
  • Next by thread: Re: list of aliases
  • Index(es):
    • Date
    • Thread