RubyOSA provides a bridge from Ruby to the Apple Event Manager. It allows Ruby programs to automate Mac OS X applications in the same way as AppleScript. For example, controlling iTunes: require 'rbosa' itunes = OSA.app('iTunes') track = itunes.current_track p track # <OSA::Itunes::FileTrack:0x1495e20> p track.name # "Over The Rainbow" p track.artist # "Keith Jarrett" p track.duration # 362.3689