Return values in RubyOSA

While holding the Ruby Hoedown BoF about RubyOSA and AppScript, I mentioned how I’ve never gotten a return value out of RubyOSA – which is why I used AppScript when I needed a return value.

Shoot me now.

A quick google of “rubyosa applescript return value” yielded this post to ruby-talk-google. Woops…

It’s this simple:

require 'rubygems'
require 'rbosa'
skype = OSA.app('Skype')
OSA.wait_reply = true
call = skype.send2 "call echo123"

And call is non-nil.

Admittedly, I’m somewhat at a loss as to why wait_reply is defaulted to nil…

Update 8/11/04 1609: Laurent tells me that, if the Applescript definition is correct, RubyOSA should correctly provide return values. Chalk that up as yet another bug in the Skype Applescript API. I’ll report it soon (it’s going into iGTD now…).

– Thanks, Laurent!

Posted by evan on Friday, August 10, 2007

blog comments powered by Disqus