Re: Count of paragraphs in a TextEdit document
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