• 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: Coercing document list to alias list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coercing document list to alias list


  • Subject: Re: Coercing document list to alias list
  • From: KOENIG Yvan <email@hidden>
  • Date: Fri, 8 Dec 2006 13:26:09 +0100



Hello

You used a wrong syntax and other responces forgot a Finder bug.
I often uses this kind of code.

tell application "Finder"
 set TheFolder to choose folder
 try
set TheContent to (every file of TheFolder) as alias list
 on error (*
Here when the folder contains a single file *)
 set TheContent to {(first file of TheFolder) as alias}
 end try
end tell

The try code is required because the first set TheConten instruction fails when the folder contains a single file.

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:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >Coercing document list to alias list (From: Jay Louvion <email@hidden>)
 >Re: Coercing document list to alias list (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Problems with grouped boxes in Quark
  • Next by Date: Re: System Events Mouseup (AppleScript-Users Digest, Vol 3, Issue 621)
  • Previous by thread: Re: Coercing document list to alias list
  • Next by thread: Re: Coercing document list to alias list
  • Index(es):
    • Date
    • Thread