YoungRacoon Posted May 9, 2008 Posted May 9, 2008 (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 May 9, 2008 by YoungRacoon
Michel Claveau Posted May 11, 2008 Posted May 11, 2008 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
YoungRacoon Posted May 12, 2008 Author Posted May 12, 2008 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now