Re: Getting count of paragraphs in Scriptable Text Editor
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