AppleScript: Revised Document Statistics

This is a revised version of the clipboard document statistics script that I used some time ago. It now counts the paragraphs and includes a 1-button dialog box.

(*
Count the number of characters, words and paragraphs in the clipboard
David R. - www.sixhat.net
 
To use place this script in your User Scripts folder in ~/Library/Scripts
*)
set nChars to count (the clipboard)
set nWords to count words of (the clipboard)
set nParag to count paragraphs of (the clipboard)
 
display dialog "Characters: " & nChars & "
Words: " & nWords & "
Paragraphs: " & nParag buttons {"OK"} default button 1

Installing the script

To use the script just use the AppleScript Editor that ships with MacOS (search in side the utilities folder) and save this as a script in your Scripts folder in ~/Library/Scripts.

AppleScript: Word Count, anywhere

Sometimes one needs to count the number of words and characters of text that we’ve written.

Here’s a small script to do just that:

set nChars to count (the clipboard)
set nWords to count words of (the clipboard)
 
display dialog "Characters: " & nChars & "
Words: " & nWords

Use Script Editor and paste the above code. Then save it to your scripts folder and every time you want to have word count just copy the text and invoke the script.