Greetings, folks!
Ruby just started requiring an osax call before a sound would play.
In the following example script, the sound will not play without the
prior “osax.say” call. It is part of scripts that ran fine for years,
and still run fine, except now no sound is played (to let me know the
script has finished).
Thoughts?
Thanks!!
Richard F.
Mac OS X 10.6.8
RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [x86_64-darwin10.7.0]
#!/usr/local/bin/env ruby -wKU
require ‘appscript’; include Appscript
require ‘osax’; include OSAX
osax.say ‘test’ # if this is not here the following will not run
app(“Play Sound”).play(“HD:System:Library:Sounds:Tink.aiff”)
These are the errors returned regardless of sound played or not
doctype.rb:255: warning: `+’ after local variable is interpreted as
binary operator