Systemwide ‘Word Count’ Service for OS X

John Gruber explained how to set this up a year ago:

Back in October my friend Jesper wrote a nifty little utility called ThisService. You give ThisService a script — either AppleScript or any Unix scripting language such as Perl, Python, or Ruby — and it generates a system-wide service based on that script, right there in the Services menu, available in any app. No Xcode or Cocoa required. You just write the script… …This one is about as simple as it gets, but I use it quite often. It takes as input the currently selected text in the frontmost app, and then displays an alert showing the number of words in the selection.

I installed it and it works spectacularly well. This is particularly useful for applications that don’t have their own word counters (Safari), or for ones that have word counters with stupid keyboard shortcuts (TextMate).

Just one thing to note, finding the right keyboard shortcut proved somewhat difficult for me. The one Gruber uses, shift-command-K, will interfere with Safari’s “Block Pop-Up Windows” menu item (which I don’t think needs a friggin’ shortcut to begin with). I opted for shift-command-End, as that isn’t likely to conflict with any app’s built-in shortcuts.

About Nima

Hi, my name is Nima Yousefi and this is my frickin’ sweet website. I’m not an expert in any particular field, however I do own a computer and an Internet connection, and therefore naturally assume that my random thoughts and opinions are important and that the lives of everyone on Earth would be improved dramatically by reading those random thoughts and opinions.
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">