Sign in to follow this  
Followers 0

AutoIt and Python - Limited Functions


8 posts in this topic

Posted

I'm using Python to call AutoIt functions, but some functions don't work. Is there a reason for this? If so, can I fix it?

from win32com.client import Dispatch
Auto = Dispatch("AutoItX3.Control")
def autoTest():
	print Auto.MsgBox('')

When I run it I get this error:

line 516, in __getattr__
	raise AttributeError("%s.%s" % (self._username_, attr))
AttributeError: AutoItX3.Control.MsgBox

It seems like it's reading 'MsgBox' as an attribute and not a function. Any thoughts?

aymhenry likes this

Share this post


Link to post
Share on other sites



Posted

Nevermind, I simply did not research well enough. Please disregard. :mellow:

Share this post


Link to post
Share on other sites

Posted

but it is a very good idea Python call Autoit.

Share this post


Link to post
Share on other sites

Posted

Sooooo what was the problem?

Posted Image

Share this post


Link to post
Share on other sites

Posted

I'm willing to guess that MsgBox(flag,title,msg) needs those parameters.

Share this post


Link to post
Share on other sites

Posted

Hello everyone, I'm new here and experiencing the same problem as Ryushi, using Python to call COM automating AutoIt

But even with these parameters,

from win32com.client import Dispatch
Auto = Dispatch("AutoItX3.Control")
def autoTest():
    print Auto.MsgBox( 0, "title", "text" )

I got that error

line 516, in __getattr__
    raise AttributeError("%s.%s" % (self._username_, attr))
AttributeError: AutoItX3.Control.MsgBox

Maybe i didn't understood something clearly,

Thank you for your help !

Share this post


Link to post
Share on other sites

Posted

What functions can you get to work?

Share this post


Link to post
Share on other sites

Posted

Hello!

I face the same problem, when try to launch message box from Python:

autoIT.MsgBox(0, "Strange", "Hello!")

AttributeError: AutoItX3.Control.MsgBox

What is the solution?

Could you, please, provide it.

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