• 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: Getting count of paragraphs in Scriptable Text Editor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting count of paragraphs in Scriptable Text Editor


  • Subject: Re: Getting count of paragraphs in Scriptable Text Editor
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 14 Jun 2001 12:58:02 -0700

On 6/14/01 8:44 AM, Michelle Steiner <email@hidden> wrote:

>set theFile to (choose file with prompt "Locate file 'Try List'") as alias
>set foo to read theFile
>set {tid, text item delimiters} to {text item delimiters, return}
>set numOfParas to count text items of foo
>set text item delimiters to tid
>numOfParas

Doh. Sometimes I don't see the forest for the trees.

set numOfParas to count paragraphs of foo
or even better:
set numofparas to count paragraphs of (read theFile)

Then there's no reason to mess with TIDs.

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Prev by Date: Re: simple question
  • Next by Date: moving files from folder when updated!
  • Previous by thread: Re: Getting count of paragraphs in Scriptable Text Editor
  • Next by thread: Question about "info for" command
  • Index(es):
    • Date
    • Thread