Jump to content

Perl Error: Could not start AutoItX3 Control through OLE


AndreyM
 Share

Recommended Posts

Hello,

I am trying to use Win32::IEAutomation to do some IE automation.

Here is the code example:

#!/usr/bin/perl -w

use strict;

use Win32::IEAutomation;

my $ie = Win32::IEAutomation->new( visible => 1, maximize => 1);
$ie->gotoURL('http://www.google.com');

 

When I run this code I get the following error: Could not start AutoItX3 Control through OLE and a blank IE window.

I looked all over the web and was not able to find an answer. Maybe someone here could assist.

 

When I try to run the code below it works fine.

use Win32::OLE;

my $ie = Win32::OLE->new( 'InternetExplorer.Application' )
        or die "error starting IE";
$ie->{visible} = 1;
$ie->navigate( 'http://google.com/' );

 

Thank you,

-Andrey

 

Link to comment
Share on other sites

Your code example works for me (Win 7, IE 9, ActiveState Perl 5.8).

If you take a look at WinClicker.pm in IEAutomation folder of your Perl installation, you'll see that the command that is executed immediately before the line that fails, is registration of the DLL. You could try to do that registration manually in a CMD-window:

 

regsvr32 <full path to AutoItX3.dll>

If the command fails this is the problem.

If the command runs without errors you could try to install AutoIt on your PC. This should not take more than 5 minutes. I have AutoIt on my PC.

If this still doesn't help you have to spend some time to google this:

 

perl IEAutomation AutoItX3 Control

Regards Lars.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...