• 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: applescript-users digest, Vol 2 #113 - 11 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: applescript-users digest, Vol 2 #113 - 11 msgs (From: email@hidden)

  • Prev by Date: Re: applescript-users digest, Vol 2 #113 - 11 msgs
  • Next by Date: Re: looking for scriptable graphics app.
  • Previous by thread: Re: applescript-users digest, Vol 2 #113 - 11 msgs
  • Next by thread: Re: applescript-users digest, Vol 2 #113 - 11 msgs
  • Index(es):
    • Date
    • Thread