• 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: Count of paragraphs in a TextEdit document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Count of paragraphs in a TextEdit document


  • Subject: Re: Count of paragraphs in a TextEdit document
  • From: kai <email@hidden>
  • Date: Mon, 1 Nov 2004 20:10:57 +0000


On Sunday, October 31, 2004, at 08:01 pm, Jean-Baptiste LE STANG wrote:

You must force the object resolution using a 'get' : count ( get paragraphs of document 1)
++ JB


Le 1 nov. 04, à 09:17, wayne melrose a écrit :

count every paragraph of document 1
or
count paragraphs of document 1

try that.. failing that.. you could always set the body of text to a variable, then just count paragraphs of the variable..

outside of a textedit tell ..

On Nov 1, 2004, at 9:01 AM, Kumar Shailove wrote:

I am writing following script to count number of paragraphs in a “TextEdit” document, but it doesn’t work.

 

tell application “TextEdit”

count each paragraph of document 1

end tell


Getting the paragraphs and then counting the resulting list certainly works - although it can be faster (especially with a large document) to use something like:

----------------

tell application "TextEdit" to count paragraphs of document 1's text

----------------

or

----------------

tell application "TextEdit" to count each paragraph of document 1's text

----------------

---
kai

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: text item delimiters
  • Next by Date: Re: Dice
  • Previous by thread: Re: Count of paragraphs in a TextEdit document
  • Next by thread: Adding files to AppleScript Studio Application
  • Index(es):
    • Date
    • Thread