Jump to content

Using Dll in Perl module win32::API


Recommended Posts

  • 4 weeks later...

Use Win32;

Use Win32::API;

Use Win32::OLE;

my $Au3 = Win32::OLE-New("AutoIt3x.Control");

$Au3->WinGetHandle("strTitle", "strTxt");

so on so forth :dance:

<{POST_SNAPBACK}>

Does anyone have an instance of this actually working? I have installed Win32::API and Win32::OLE through ppm but I am getting the same message as the original poster. Please help! :whistle:
Link to comment
Share on other sites

  • 5 months later...

Hum i really think you must read the documentation of AutoItX3:

Before you can use the COM interface to AutoItX it needs to be "registered" (This is done automatically when you install the full version of AutoIt but you may need to do it manually if you are using AutoItX seperately).

To register the COM interface:

1. Open a command prompt

2. Change directory (using CD) to the directory that contains AutoItX3.dll

3. Type regsvr32.exe AutoItX3.dll and press enter

The name of the AutoItX control is AutoItX3.Control

and of ActivePerl....

Win32::OLE->new(PROGID[, DESTRUCTOR])

The code who works fine is this one:

use Win32;
use Win32::API;
use Win32::OLE;
my $Au3 = Win32::OLE->new("AutoItX3.Control");
$Au3->Run("calc.exe");

And after reading all docs... it works :lmao:

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...