A really quick time for anyone on OSX.
RubyOSA is a great interface to the AppleScript APIs available to most applications. The only problem with it is that the APIs of many apps are undocumented, disappointingly especially for Apple's apps, so there's a handy little command that can generate these docs for you:
rdoc-osa --name (appname)
e.g.
rdoc-osa --name iPhoto