in reply to Monitoring New Mail Reception @ Outlook
Hi Everyone,
After all I could came across Using OLE Events with Win32::OLE which work perfectly with Internet Explorer. Here is the simple test code:
use strict; use Win32::OLE qw(EVENTS); use Win32::OLE::Variant; $|=1; my $ie = Win32::OLE->new('InternetExplorer.Application'); $ie->{Visible} = 1; Win32::OLE->WithEvents($ie, \&Event, 'DWebBrowserEvents2'); while (1) { Win32::OLE->SpinMessageLoop; Win32::Sleep(100); } sub Event { my ($obj,$event,@args) = @_; print "\nEvent: $event\n"; for my $arg (@args) { my $value = $arg; $value = sprintf "[%s %s]", Win32::OLE->QueryObjectType($value) if UNIVERSAL::isa($value, 'Win32::OLE'); print " arg: $value\n"; } }
Now my problem is what should I use in place of 'DWebBrowserEvents2'(INTERFACE) if I want to use "Outlook.Aplication" in the above code? - SB
|
|---|