Has AppleScript Lost Its Luster?
Peter Cooper at the RubyInside blog has a great post on the feasibility of using the Ruby scripting language as an AppleScript replacement. Putting the fact that I'm a Ruby fanatic aside, Peter makes a good case for making the switch to Ruby for scripting OS X. The post links to a series of tutorials that demonstrate OS X scripting using the rb-appscript Ruby gem, which is a high-level Apple Event Bridge written in Ruby. Using rb-appscript, the following AppleScript code:
tell application "TextEdit"
get paragraph 1 of document "Read Me"
Can be written as the following one-liner in Ruby:
We already know that Ruby got the royal treatment in 10.5 with the inclusion of Ruby on Rails and other Ruby niceties. Perhaps rb-appscript is a natural step in the Rubification of OS X.