|
Good article - thank you. And I like the idea of using Ruby rather than AppleScript.
Unfortunately, it seems there's no escaping the "can't get there from here" frustrations of OSA, and errors that come back are rendered even more cryptic.
The first thing I wanted to do was to get the selected text from the first window in Eudora, but even identifying the first window seems impossible.
app('Eudora').windows[1]
app('Eudora').application.windows[1]
app('Eudora').window[1]
They all seem to fail with 'unknown property, element or command', making it hard to decide how to go on.
eudora = app('Eudora')
sub = eudora.messages[1].subject
puts sub
doesn't throw any errors, but it doesn't seem to give back anything useful either.
Has anyone had any success driving Eudora from rb-appscript, or is the underlying AETE too broken to allow it?
|
Eudora just whines at you when you say that. So you can't say it in Ruby either.
As for your second example, it would help you to take time to read what I said in the article, or at least the rb-appscript docs.
eudora.messages[1].subjectis a reference. To evaluate it, useget:works fine.