in reply to Re^3: Win32::IEAutomation and existing IE session
in thread Win32::IEAutomation and existing IE session

Change the error message to include $^E or Win32::OLE::LastError()
  • Comment on Re^4: Win32::IEAutomation and existing IE session

Replies are listed 'Best First'.
Re^5: Win32::IEAutomation and existing IE session
by zerocred (Beadle) on Apr 06, 2010 at 09:30 UTC

    Many thanks for the suggestion - Here is the new error response.

    If I start IE either with the original program or manually, then comment out the '->new' constructor in IeExisting like this:

    $self->{agent} = Win32::OLE->GetActiveObject('InternetExplorer.Application') #|| Win32::OLE->new("InternetExplorer.Application") || die "Could not start Internet Explorer Application through OLE +$^E\n";

    The response becomes:

    Could not start Internet Explorer Application through OLE The requested lookup key was not found in any active activation context

    If I don't comment it out it starts a new window with no error...

    Hmmm...

    IE version 7.0.5730.13 Build 75730