Jump to content
Sign in to follow this  
flint

Problems with automation from Perl

Recommended Posts

flint

Hello, I write with use of dictionaries as English I do not know, therefore I apologise for errors in

words.

Whether I wish to learn it is possible to carry out somehow ALL its functions by means of Perl?

For example, such code works:

#!/usr/bin/perl -w
use Win32::OLE;
my $Au3 = Win32::OLE->new("AutoItX3.Control");
$Au3->CDTray("D:", "open");

And such is not present:

#!/usr/bin/perl -w
use Win32::OLE;
my $Au3 = Win32::OLE->new("AutoItX3.Control");
$Au3->SoundSetWaveVolume(50);

Gives such mistake:

"[Tue Nov 20 12:52:36 2007] 777.pl: Win32::OLE(0.1707) error 0x80020003: "+ыхэ уЁєяяv эх "

[Tue Nov 20 12:52:36 2007] 777.pl: in METHOD/PROPERTYGET "" at 777.pl line 8"

And it is A LOT OF such not working functions.

Whether anywhere a smog find it is possible to make so that all worked from Perl thus?

Whether still wished to learn it is possible through Perl to use libraries UDF, after all it will not be already simple INCUDE to work.

Edited by flint

Share this post


Link to post
Share on other sites
PsaltyDS

CDTray() is a built-in a AutoIt function, and SoundSetWaveVolume() is not. It must be defined somehow with Func/EndFunc either in a script or an "#include" file.

You might get more help on how to define a UDF when using AutoItX if you post the question in that specific forum: ActiveX/COM Help and Support (AutoItX)

:P

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
flint

Thanks, has understood. :P

Edited by flint

Share this post


Link to post
Share on other sites
flint

Has not understood about SoundSetWaveVolume () - why it not function Autoit? In a management it is specified in section "the index of functions", instead of "the index of library functions", about #include there is not written, the example resulted there is normally started by simple script Autoit (not Perl). Or I try function $Au3-> Execute (' 1+1 ')-too does not work (it is directly near to CDTray () in the instruction).

Well it is fine, likely it is already connected with Win32:: OLE Perl, there's nothing to be done. :P

Edited by flint

Share this post


Link to post
Share on other sites
PsaltyDS

Has not understood about SoundSetWaveVolume () - why it not function Autoit? In a management it is specified in section "the index of functions", instead of "the index of library functions", about #include there is not written, the example resulted there is normally started by simple script Autoit (not Perl). Or I try function $Au3-> Execute (' 1+1 ')-too does not work (it is directly near to CDTray () in the instruction).

Well it is fine, likely it is already connected with Win32:: OLE Perl, there's nothing to be done. :P

Sorry, my mistake. SoundSetWaveVolume() is in fact a built-in AutoIt function in the regular AutoIt production 3.2.8.1 and the Beta 3.2.9.9. I must have mistyped it when looking the first time.

However, it is still NOT listed in the AutoItX help file (but CDTray is). That may be the problem: not all functions are available from AutoItX that are present in the regular AutoIt versions.

The same seems to be true for the compiler directive #include, which is not listed in the AutoItX help file.

From the AutoItX help file:

AutoItX is a DLL version of AutoIt v3 that provides a subset of the features of AutoIt via an ActiveX/COM and DLL interface.

The magic word is "subset".

:-)

Edit: Added quote.

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
flint

All right, I will work with usual Autoit from Perl. It simply is more difficult for organising, but other exit is not present.

Share this post


Link to post
Share on other sites
weaponx

What is your native language? There are a lot of people here from all over the world.

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  

×