Jump to content

Using AutoIT with python


Recommended Posts

I just found autoit while i was researching how to accomplish a couple of things for the program i am writing in python. and i am wondering how i can go about using the functions available in autoit in this program. The functions avaible with autoit (for example mouse movement etc.) is exactly what i need but i do not want to scrap what i have and learn an entirely knew language. so if there is anyway to do this i would love to know how

thanks

Link to comment
Share on other sites

I just found autoit while i was researching how to accomplish a couple of things for the program i am writing in python.  and i am wondering how i can go about using the functions available in autoit in this program.  The functions avaible with autoit (for example mouse movement etc.) is exactly what i need but i do not want to scrap what i have and learn an entirely knew language.  so if there is anyway to do this i would love to know how

thanks

<{POST_SNAPBACK}>

Take a look at AutoItX here.

You can also use Python functions/classes with AutoIt as beta version has com support and you can create com servers with Python.

Link to comment
Share on other sites

I just found autoit while i was researching how to accomplish a couple of things for the program i am writing in python.  and i am wondering how i can go about using the functions available in autoit in this program.  The functions avaible with autoit (for example mouse movement etc.) is exactly what i need but i do not want to scrap what i have and learn an entirely knew language.  so if there is anyway to do this i would love to know how

thanks

<{POST_SNAPBACK}>

hipitarius,

You could take a look at AutoItX, which is included in AutoIt3. It's a subset of AutoIt commands that can be called from other programs/languages. I don't know how Python can handle 'objects' or COM/OLE interfaces, but I'm sure you can find out.

AutoItX is in the 'extras' folder in the AutoIt3 start menu or in the AutoItX subdirectory where you installed AutoIt3.

Regards,

-Sven

EDIT: grrrmm, tuape was faster than me :-)

Edited by SvenP
Link to comment
Share on other sites

AutoItX is an implementation of AutoIt3 as a Windows DLL and an ActiveX control.

You could use a SWIG wrapper or the ctypes module to access the DLL, or you could access the ActiveX control using COM, it just depends what you have already and what performance you need to achieve...

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Link to comment
Share on other sites

AutoItX is an implementation of AutoIt3 as a Windows DLL and an ActiveX control.

  You could use a SWIG wrapper or the ctypes module to access the DLL, or you could access the ActiveX control using COM, it just depends what you have already and what performance you need to achieve...

<{POST_SNAPBACK}>

sorry i don't have any sample code, but that is because i am very confused and can not find any COM interface example between python and autoitx, so if anyone had a very basic example of how to pull that off, i could prob figure out the rest. cause right now im drowning in the autoit help file.

thanks

Link to comment
Share on other sites

import win32com.client

o = win32com.client.Dispatch( "AutoItX3.Control" )

o.MouseMove( 10, 100 )

o.MouseMove( 700, 700, 0 )

this is a sample that just slides the mouse around

it turned out to be very very simple to do thanks for the help

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