From: Florian Gilcher Date: 2008-06-13T02:57:44+09:00 Subject: Re: How to get 'NewMail' event from Outlook -----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-----