From schapht at gmail.com Mon Feb 4 15:04:35 2008
From: schapht at gmail.com (Mat Schaffer)
Date: Mon, 4 Feb 2008 15:04:35 -0500
Subject: [Rubyosa-discuss] Scripting emails in Entourage 2008
Message-ID: <9C3876B6-B727-44B6-BC48-F335C695283F@gmail.com>
So I just got entourage 2008 and was really excited to find that it's
now an .app bundle so I can use RubyOSA rather than having to use
inline applescript to drive it.
But I'm having issues trying to create messages. Here's the code:
require 'rubygems'
require 'rbosa'
entourage = OSA.app('Microsoft Entourage')
entourage.activate
email = entourage.make(OSA::MicrosoftEntourage::DraftWindow, nil)
email.to_recipients = "schapht at gmail.com"
Which causes:
NoMethodError: undefined method `to_recipients=' for
#
at top level
in email.rb at line 8
From the documentation generated with rdoc-osa, it looks like
entourage.make(OSA::MicrosoftEntourage::DraftWindow, nil) should be
returning a OSA::MicrosoftEntourage::DraftWindow, but it's actually
returning a OSA::MicrosoftEntourage::Window.
Anyone tried this yet? I'll keep playing with it and see if I find
anything. I tried :with_properties as well, and that didn't work
either. Just got an invalid key error.
Thanks in advance!
-Mat