• 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: Shane Stanley <email@hidden>
  • Date: Thu, 14 Jun 2001 21:41:48 +1000

On 14/6/01 4:33 PM +1000, email@hidden, email@hidden, wrote:

> I'm trying to write a script which involves getting the number of items in a
> list (each followed by a paragraph return) in Scriptable Text Editor.
> I've tried this:
> set theFile to (choose file with prompt "Locate file 'Try List'") as alias
> open for access theFile
> tell application "Scriptable Text Editor"
> set theCount to the count of paragraphs of theFile
> end tell
> display dialog theCount
>
> But I get an error that Applescript expected a reference at " count of
> paragraphs of theFile".
> Can anyone tell me what I'm doing wrong?

You open files, but you count the paragraphs of documents. Try "count of
paragraphs of document 1".

--
Shane Stanley, email@hidden


References: 
 >Getting count of paragraphs in Scriptable Text Editor (From: email@hidden)

  • Prev by Date: How to 'load' osaxen
  • Next by Date: Re: Script to copy changed files?
  • Previous by thread: Getting count of paragraphs in Scriptable Text Editor
  • Next by thread: Re: Getting count of paragraphs in Scriptable Text Editor
  • Index(es):
    • Date
    • Thread