Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.
Ruby Inside - A Ruby Blog

Rb-AppScript: Get AppleScript-style functionality in Ruby

By Peter Cooper / October 17, 2006

Rb-AppScript is an event bridge between Ruby and OS X that allows you to get AppleScript-esque control in OS X. The Appscript creators claim Appscript is a 'serious alternative' to AppleScript and it certainly looks good. Check out this example:

AS.app('TextEdit').documents[1].paragraphs[1].get

The equivalent AppleScript?

tell application "TextEdit"
 get paragraph 1 of document 1
end tell

Appscript provides the system to perform remote procedure calls to OS X applications, converts values between Ruby and Apple classes, and allows developers to get full use out of OS X while still using Ruby's object oriented environment.

Comments

  1. Oleg Andreev says:
    October 18, 2006 at 6:09 am

    As serious as VBA for MS Office is :-)

Other Posts to Enjoy

Twitter Mentions

AltStyle によって変換されたページ (->オリジナル) /