• 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: Making one item in a list into a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making one item in a list into a list


  • Subject: Re: Making one item in a list into a list
  • From: "Marc K. Myers" <email@hidden>
  • Date: Wed, 31 Mar 2004 22:21:15 -0500

This works for me (OS X 1.2.8):

set theFldr to (choose folder)
tell application "Finder"
try
set theFoldersList to (every folder of the entire contents [line break]
of folder (theFldr as text)) as alias list
on error
try
set theFoldersList to (every folder of the entire contents [line break]
of folder (theFldr as text)) as alias as list
on error
display dialog "There were no folders"
end try
end try
end tell


Subject: Making one item in a list into a list
Date: Wed, 31 Mar 2004 12:30:20 -0500
From: "Jeff Handy" <email@hidden>
To: <email@hidden>

I thought I could coerce anything into a list?? I'm trying to list all
folders (in this case there is only one folder) into a list. However,
AS won't do it. What the?? The first part of this block works fine for
multiple folders. However, when there is only one folder, I thought the
second line in the block would work. What am I doing wrong? Here's
what I have.


----------- Code is below this line --------------

try
Set theFoldersList to (every folder of the entire contents of folder
thisQuickTimeFolder) as alias list
On error
Set theFoldersList to (every folder of the entire contents of folder
thisQuickTimeFolder) as list
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Setting desktop position of disks
  • Next by Date: Re: Setting desktop position of disks
  • Previous by thread: Re: Making one item in a list into a list
  • Next by thread: Check out this switch testimonial
  • Index(es):
    • Date
    • Thread