Sign in to follow this  
Followers 0
Guest wwilson

Calling Autoit from perl

2 posts in this topic

I am trying to call autoit with perl. I saw the other post that said can be done so I followed its example and tried the following:

#! /usr/bin/perl5

use Win32;

#use Win32::API;

use Win32::OLE;

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

$Au3->GUICreate("Hello World", 200, 100);

$Au3->GUICtrlCreateLabel("Hello world! How are you?", 30, 10);

$okbutton = $Au3->GUICtrlCreateButton("OK", 70, 50,60);

$Au3->GUISetState(@SW_SHOW);

sleep 30;

Which returned the following error:

Undefined subroutine &main::New called at C:\Autoit3\Testing\autoit_perl.pl line 5.

Any Ideas? Is there example I can follow?

Share this post


Link to post
Share on other sites



I am trying to call autoit with perl. I saw the other post that said can be done so I followed its example and tried the following:

#! /usr/bin/perl5

use Win32;

#use Win32::API;

use Win32::OLE;

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

$Au3->GUICreate("Hello World", 200, 100);

$Au3->GUICtrlCreateLabel("Hello world! How are you?", 30, 10);

$okbutton = $Au3->GUICtrlCreateButton("OK", 70, 50,60);

$Au3->GUISetState(@SW_SHOW);

sleep 30;

Which returned the following error:

Undefined subroutine &main::New called at C:\Autoit3\Testing\autoit_perl.pl line 5.

Any Ideas? Is there example I can follow?

<{POST_SNAPBACK}>

the autoitx dll doesn't have any gui creation functions...

if you need gui, you'll have to use the production or beta version of AutoIt.

the autoit gui can act as a front end for the perl code.


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
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
Sign in to follow this  
Followers 0