Friday, September 26, 2014

Top 10 surprising TextEdit for Mac tips - Features - Macworld UK

Here is an excerpt. (I tried this and it WORKS!)


View word and character count in TextEdit

One missing feature most requested by TextEdit users is word count. Adding it to TextEdit is extremely easy via a little AppleScript.
Open the AppleScript Editor program, which you’ll find in in the Applications list of Finder. When it starts click the New Document button, then paste in to the main editing area what you see below:
tell application "TextEdit"
set wc to count words of document 1
set cc to count characters of document 1
if wc is equal to 1 then
set txt to " word and "
set txt to " words and "
end if
if cc is equal to 1 then
set txtc to " character."
set txtc to " characters."
end if
set result to (wc as string) & txt & (cc as string) & txtc
display dialog result with title "Word and character count" buttons {"OK"} default button "OK"
end tell
On the toolbar click the Compile button, then click File > Save. When the Save As dialog box appears, type Shift+Cmd+G and in the new dialog box, type~/Library/Scripts.
Type Word Count into the Save As name field, and click the Save button.
Switch back to the AppleScript Editor window, and tap Cmd+, (comma) to open its preferences dialog box. Click the General tab and put a tick alongside Show Script Menu in Menu Bar.
Close AppleScript Editor. From now on, whenever you want to perform a word/character count within TextEdit, click the small script icon at the top right of the screen near the Wi-Fi icon and select the Word Count option.

Saturday, September 20, 2014