O'Reilly logo

MacRuby in Action by Brendan G. Lim with Jerry Cheung and Jeremy McAnally

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. Scripting with MacRuby

Sometimes a window-based Cocoa application is too much for what you need to accomplish. Ruby developers are accustomed to using the language to write quick scripts that perform occasional lightweight tasks that don’t need a graphical interface. MacRuby is no different and lets you accomplish the same thing while being able to interact with Mac OS X applications that conform to Apple’s Open Scripting Architecture (OSA) through the Scripting Bridge framework.

AppleScript is Apple’s language for interacting with applications that are OSA compliant. For a long time, AppleScript has been the language of choice for scripting on the Mac. With Apple’s continued Ruby and MacRuby support, we wouldn’t be surprised to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required