R
Richard Fairbanks
<2.33GHz MBPC2D running OS X 10.6.3>
OSAX calls within the default 64-bit environment of OS X 10.6.3 (I have
not tried with earlier OS X versions) are failing when using what has
been recommended for forcing Ruby to run in 32-bit mode: “#! arch -i386
rubyâ€.
A test script, results, and software versions are appended below.
Thoughts?
Thanks!!
Richard Fairbanks
---- Script ----
#! arch -i386 ruby
require 'rubygems'
require 'appscript'; include Appscript
require 'osax'; include OSAX
p scripting_additions
#=> ["Digital Hub Scripting", "Numerics", "Satimage",
"SpeedDownloadLoader", "StandardAdditions", "XMLLib"]
# so good so far and non-OSAX scripts run as expected, but
# none of the following work:
osax.beep
osax.set_the_clipboard_to("howdy")
osax.say ("Hey, wake up.", :using=>"Victoria")
---- Results ----
RuntimeError: OSAX::ScriptingAddition can't dynamically retrieve
scripting addition terminology within a 64-bit process.
from /Library/Ruby/Site/1.8/osax.rb:153:in `initialize'
from /Library/Ruby/Site/1.8/osax.rb:102:in `new'
from /Library/Ruby/Site/1.8/osax.rb:102:in `osax'
from /Library/Ruby/Site/1.8/osax.rb:124:in `osax'
from (irb):4
---- Software Versions ----
ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]
RubyGems 1.3.6
StandardAdditions.osax version 2.1.2
# To determine whether Ruby is running in 32bit or 64bit
['foo'].pack('p').size #=> 8 on 64bit, 4 on 32bit, I got “8â€
OSAX calls within the default 64-bit environment of OS X 10.6.3 (I have
not tried with earlier OS X versions) are failing when using what has
been recommended for forcing Ruby to run in 32-bit mode: “#! arch -i386
rubyâ€.
A test script, results, and software versions are appended below.
Thoughts?
Thanks!!
Richard Fairbanks
---- Script ----
#! arch -i386 ruby
require 'rubygems'
require 'appscript'; include Appscript
require 'osax'; include OSAX
p scripting_additions
#=> ["Digital Hub Scripting", "Numerics", "Satimage",
"SpeedDownloadLoader", "StandardAdditions", "XMLLib"]
# so good so far and non-OSAX scripts run as expected, but
# none of the following work:
osax.beep
osax.set_the_clipboard_to("howdy")
osax.say ("Hey, wake up.", :using=>"Victoria")
---- Results ----
RuntimeError: OSAX::ScriptingAddition can't dynamically retrieve
scripting addition terminology within a 64-bit process.
from /Library/Ruby/Site/1.8/osax.rb:153:in `initialize'
from /Library/Ruby/Site/1.8/osax.rb:102:in `new'
from /Library/Ruby/Site/1.8/osax.rb:102:in `osax'
from /Library/Ruby/Site/1.8/osax.rb:124:in `osax'
from (irb):4
---- Software Versions ----
ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]
RubyGems 1.3.6
StandardAdditions.osax version 2.1.2
# To determine whether Ruby is running in 32bit or 64bit
['foo'].pack('p').size #=> 8 on 64bit, 4 on 32bit, I got “8â€