Re: Stuffit Commands and Lists
Re: Stuffit Commands and Lists
- Subject: Re: Stuffit Commands and Lists
- From: Pier Kuipers <email@hidden>
- Date: Thu, 21 Jun 2001 17:36:15 +0100
At 19:08 -0700 20/6/01, Michelle Steiner wrote:
On 6/20/01 3:54 PM, Pier Kuipers <email@hidden> wrote:
>Any nice ideas out there?
yup, and you're going to hate yourself. :)
choose folder with prompt "Please select a folder to be compressed:"
tell application "Finder"
set theContents to (every item of the result) as alias list
end tell
as alias list... I don't believe it! I suppose you learn something every day.
Thanks Michelle - and Mark - and Shane for the error capture bit. I
just love error capture (and need it).
At 17:12 +1000 21/6/01, Shane Stanley wrote:
On 21/6/01 12:08 PM +1000, Michelle Steiner, email@hidden, wrote:
choose folder with prompt "Please select a folder to be compressed:"
tell application "Finder"
set theContents to (every item of the result) as alias list
end tell
Which will probably be fine in this case, but fail if there's only one item.
So it would probably be best to make it something like:
set theFolder to choose folder with prompt "Please select a folder to be
compressed:"
tell application "Finder"
try
set theContents to (every item of theFolder) as alias list
on error
set theContents to (every item of theFolder) as alias
end try
end tell
--
Pier Kuipers
Visual ID
* the Media Asset Management solution *
2 Whitefriars
Aungier Street
Dublin 2
Tel. +353 1 476 7059
Mobile +353 87 294 3063
Fax +353 1 478 1366
ISDN +353 1 602 0754
http://www.visualid.com