Getting count of paragraphs in Scriptable Text Editor
Getting count of paragraphs in Scriptable Text Editor
- Subject: Getting count of paragraphs in Scriptable Text Editor
- From: email@hidden
- Date: Thu, 14 Jun 2001 02:33:56 EDT
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?
Thanks,
Andy D