RubyAEOsa return values changed?

T

tom

Hi Guys

I have noticed that releases of the rubyaeosa project has stopped some
time ago, and was wondering if anybody has a happily-working-copy of
rubyaeosa as mine will not convert the return values into ruby objects
(via to_rbobj).

I had a look through the constants and the Type for Unicode Text is
'utxt' however any Unicode text being returned from OSA seems to end up
a 'txtu' meaning the conversion cannot take place.

I attempted to switch the 'utxt' to 'txtu' in the constants file but
this throws nasty errors, so I walked away briskly! (Im a coward I
know!!)

This is what I got, if I do a debug on @result it displays it as:
#<AEDesc:0x12859f2 type='txtu'>



require 'osx/aeosa'

class MainController < ApplicationController

def check_mail
script = <<END_OF_STRING
tell application "Mail"
set my_message to message 1 in inbox
return subject of my_message as Unicode Text
end tell
END_OF_STRING

@result = OSX.do_osascript(script)
end
end


Any ideas?
Many Thanks

Tom Medhurst
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top