Jump to content

Calling autoit with perl


Guest wwilson
 Share

Recommended Posts

Guest wwilson

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?

Link to comment
Share on other sites

Think you would do better posting this in the correct part of the forum, go to http://www.autoitscript.com/forum/index.php?showforum=14 and try there, that's for AutoIt3x

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Guest wwilson

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

Link to comment
Share on other sites

Guest wwilson

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

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