Home: Perl Programming Help: Win32 Programming Help:
OLE events handling


Dec 6, 2001, 7:43 AM

Views: 5818
OLE events handling

Hi, all Perl people!

Could anyone show me the way to handle OLE object events? I tried the following code:

use Win32::OLE qw(EVENTS);
$ie = Win32::OLE->new('InternetExplorer.Application') or die "Oops, cannot start IE";

Then I loaded into IE some file with an HTML form and wanted to track the clicking of <input> buttons.

while ($ie->Busy) {}
$ie->{Visible} = 1;

Win32::OLE->WithEvents($ie, \&Ev);
where Ev is the event handling func.
But I could not handle any events.

I will greatly appreciate any advice or recommendation.