Re: Classic Finder v OS X Finder
Re: Classic Finder v OS X Finder
- Subject: Re: Classic Finder v OS X Finder
- From: John W Baxter <email@hidden>
- Date: Wed, 1 Aug 2001 19:42:35 -0700
At 15:17 +0800 8/1/2001, Shay Telfer wrote:
>
The following script runs with the Classic Finder, but when run under
>
OS X the 'list' part of 'as list' is highlighted and the error
>
"Finder got an error: A descriptor type mismatch occurred" is
>
reported.
>
>
set searchFolder to "Random path:" as alias
>
set suffix to ".mcp"
>
tell application "Finder"
>
set the item_list to (every item of the entire contents of
>
the searchFolder whose name ends with the suffix) as list
>
end tell
I'm going to get into trouble with this...it is UNTESTED.
If your "classic Finder" isn't too old, try ...as alias list instead of
...as list
Or, leave off the as list altogether, and deal with the "single item isn't
a list" Finder foolishness outside the tell Finder block, as in
tell application "Finder"
set item_list to (...)
end tell
copy item_list as list to item_list-- I'm afraid of set here...it might
well be OK
If it's already a list, nothing happens; if not, it becomes the desired 1
item list.
--John (I hope)
--
John Baxter email@hidden Port Ludlow, WA, USA