Broken scripts

Tags ( )

On my system Count and AppendCount seemed broken. Although they set my_content to the text of my_ document, they then count my_document rather than my_content, and for reasons I do not understand this introduces errors.

Anyway, I changed AppendCount as follows and it now works perfectly, for me.


tell application "WriteRoom"
set my_document to the document of window 1
set my_content to the text of my_document
set my_chars to (count characters of text of my_content) as text
set my_words to (count words of my_content)
set my_paragraphs to (count paragraphs of text of my_content) as text
set my_response to my_chars & " Characters, " & my_words & " Words, " & my_paragraphs & " Paragraphs"
--display alert my_response
set the text of my_document to my_content & return & return & my_response
end tell

Thanks

Jeremy

Thanks!

Yes, & I have more compact and more elegant versions of all those; wrapped up in WR 1.1 right now and so behind in the scripting but that's worth the time (as you'll all see) and I'll have all the AS and Automator things for WR updated soon. Go ahead and post those fixed scripts if you want to in case others are having that devil on'em. Thanks again.

Sorry, but I am not sure

Sorry, but I am not sure where to post the fixed scripts, and I leave on holiday tomorrow morning and I haven't packed yet. So if you care to, you do it for me, please. See you all again in a couple of weeks.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.