Florian Gilcher
6/12/2008 5:58:00 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Jun 12, 2008, at 2:43 AM, Chuankai Lin wrote:
> Hi,
>
> I wrote the this script to get the 'NewMail' event from Outlook
>
> ================newmail.rb=======================
> require 'win32ole'
>
> ol = WIN32OLE.new('Outlook.Application')
> ev = WIN32OLE_EVENT.new(ol, 'ApplicationEvents')
> ev.on_event("NewMail") { puts 'NewMail!' }
>
> k = gets
>
> =================================================
I don't know you system, but what should k = gets do? This usually
lets you script wait for input on $stdin (whatever that may be). This
is no way to set you script into "waiting mode"!
Regards,
Florian Gilcher
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkhRY60ACgkQJA/zY0IIRZYPYgCgkSRA2FD4KcMhV+a7qj4k04gM
02kAnRyVptkRJgTffgDO5MQJYdczK657
=cckK
-----END PGP SIGNATURE-----