Sign in to follow this  
Followers 0
YoungRacoon

AutoItX & Python 2.5: is it possible?

3 posts in this topic

#1 ·  Posted (edited)

Hi. Is anybody here who works with AutoItX from Python 2.5?

I'm a beginner in Python so please forgive me for this stupid question :)

Examples I found on this forum relied on win32com.client module. Something like that:

import win32com.client
Auto = Dispatch("AutoItX3.Control")

But Python 2.5 doesn't provide with this module (am I wrong?). If I understand it correctly, the common way to work with dlls is using load_dynamic function from imp module. But it doesn't work in this construction:

import sys, imp
oAutoIt = imp.load_dynamic('AutoItX3.Control', 'E:\\AutoIT\\Beta\\AutoItX\\autoitx3.dll')

When I run it, I get the following error:

Traceback (most recent call last):

File "2.py", line 4, in <module>

oAutoIt = imp.load_dynamic('AutoItX3.Control', 'E:\\AutoIT\\Beta\\AutoItX\\autoitx3.dll')

ImportError: dynamic module does not define init function (initControl)

So could you please tell me how to work with AutoItX from Python properly?

Thanks, Yuri.

Edited by YoungRacoon

Share this post


Link to post
Share on other sites



Hi!

AutoitX run very well for me, since some years, with Python 2.3, 2.4, 2.5, 2.5.2

Example of code:

import win32com.client
auto=win32com.client.Dispatch('AutoItX3.Control')

And, don't forget to install Pywin32

Share this post


Link to post
Share on other sites

Hi!

AutoitX run very well for me, since some years, with Python 2.3, 2.4, 2.5, 2.5.2

Example of code:

import win32com.client
auto=win32com.client.Dispatch('AutoItX3.Control')

And, don't forget to install Pywin32

It works! Thanks!

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