Re: applescript-users digest, Vol 2 #113 - 11 msgs
Re: applescript-users digest, Vol 2 #113 - 11 msgs
- Subject: Re: applescript-users digest, Vol 2 #113 - 11 msgs
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 08 Dec 2000 18:38:27 -0800
On 12/8/00 6:00 PM, "email@hidden" <email@hidden> wrote:
>
I tried to run this script and I get an error "Can't get every text item of
>
alias (somefolder)" which errors on the line:
>
>
set pathAsList to text items of thePath
It depends what you put in as 'thePath'. You don't include any earlier part
of the script here, but it looks like someone was counting on a path name as
string - or Jon's Commands' silent coercion of alias to string maybe - and
you have put in the path name as alias. Without knowing the earlier part,
the quickest fix is simply to replace the above line with:
set pathAsList to text items of (thePath as string)
>
>
I'm on OS 8.6. Is this new language for OS 9?
Absolutely not.
>
>
Also, just curious...
>
>
Instead of:
>
set idx to (the number of text items in thePath) - 1
>
>
can't you just say:
>
set idx to -2
Yes, you can. A lot simpler, isn't it?
--
Paul Berkowitz