Jump to content
Sign in to follow this  
grafikm

Unable to use AutoItX with Python on Win7x64

Recommended Posts

grafikm

Hy!

I'm trying to use AutoItX on Windows 7 x64, with Python 2.6 (I need this version) but it won't work. It keep giving me this message :

File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", line 84, in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147221164, 'Class not registered', None, None)

The first lines of my .py file are :

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

Thanks for your help :x

Share this post


Link to post
Share on other sites
trancexx

You probably should register the server first for your system. I don't know how's that done with python but with dumber scripting languages it's usually done by running regsvr32.exe.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
grafikm

You probably should register the server first for your system. I don't know how's that done with python but with dumber scripting languages it's usually done by running regsvr32.exe.

Thanks trancexx! You were right.

To register the COM interface you simply need to do this :

  • Open a command prompt window (cmd) as an administrator
  • Go to AutoItX directory (default on Windows 7 : cd C:\Program Files (x86)\AutoIt3\AutoItX\)
  • Type these two commands :

  • regsvr32.exe AutoItX3.dll
  • regsvr32.exe AutoItX3_x64.dll

Il suffit d'enregistrer l'interface COM de cette manière :

  • Ouvrir une fenêtre d'invite de commande (cmd) en mode administrateur
  • Accéder au répertoire de AutoItX (par défaut sur Windows 7 : cd C:\Program Files (x86)\AutoIt3\AutoItX\)
  • Saisir ces deux commandes:

  • regsvr32.exe AutoItX3.dll
  • regsvr32.exe AutoItX3_x64.dll
grafik.muzik

Share this post


Link to post
Share on other sites
grafikm

This may sound stupid but... where is the « SOLVED » button on this forum?

Share this post


Link to post
Share on other sites
Richard Robertson

There is no solved button. You just have to edit the first post in the thread and change the title.

Share this post


Link to post
Share on other sites
grafikm

There is no solved button. You just have to edit the first post in the thread and change the title.

I would like to, but there's no EDIT button.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.