One thing I neglected to add to my post yesterday on counting characters was that there is most likely various different ways to achieve what I did with Applescript and Automator. That’s another sometimes positive, sometimes maddening aspect of OS X — there are so many different ways to fiddle.

Along with that fact, I should have added the caveat that there was no doubt a more elegant possible use of Applescript to achieve my desired final result. And there is — reader Jay from The Practice of Code sent me a version that is so much nicer and cleaner than mine. His does not make use of the clipboard, as you can see here:

This was originally how I wanted the script to work. I didn’t want to use the clipboard, but hunting through the library in Applescript did not yield the simple “input as text” I needed. If interested, grab the code here.

Thanks Jay for sharing your knowledge. And thanks to many others who passed on their suggestions. All were good, but Jay’s was the best.

  1. ad7am reblogged this from chrisbowler and added:
    Chris, Devon Technologies WordService freeware enabled this exact...years ago. It’s
  2. akshayashah reblogged this from chrisbowler
  3. chrisbowler posted this

All opinions expressed here are those of the author, Chris Bowler. Cupertino Kool-Aid may have had some affect. More laughs and giggles to be found here.

If you like what you've read, some of the my favorite posts are compiled here.