ryushi5 Posted August 30, 2011 Posted August 30, 2011 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 1
ryushi5 Posted August 30, 2011 Author Posted August 30, 2011 Nevermind, I simply did not research well enough. Please disregard.
aymhenry Posted November 28, 2011 Posted November 28, 2011 but it is a very good idea Python call Autoit.
JohnOne Posted December 13, 2011 Posted December 13, 2011 I'm willing to guess that MsgBox(flag,title,msg) needs those parameters. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Picard Posted August 21, 2013 Posted August 21, 2013 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 !
JohnOne Posted August 21, 2013 Posted August 21, 2013 What functions can you get to work? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Alek5andr Posted March 14, 2014 Posted March 14, 2014 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.
TyutYu Posted May 24, 2021 Posted May 24, 2021 Hello! I'm new here and I have the same problem now in 2021 too. Did anyone find solution?
Developers Jos Posted May 24, 2021 Developers Posted May 24, 2021 (edited) Like your other post: What exactly do you want to ask? Be way more explicit than this and show the full source that demonstrates your issue. Jos PS: for clarity: Have a look at the appropriate helpfile (AutoItX.chm) for the available functions in AutoItX! Edited May 24, 2021 by Jos Earthshine 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Earthshine Posted May 24, 2021 Posted May 24, 2021 (edited) I don't really know why you are using autoit at all. There are TONS of native python libraries you can use for automation. I use this with Python when needed. https://pywinauto.readthedocs.io/en/latest/ and for native Python UIAutomation I recommend https://github.com/xcgspring/AXUI Edited May 24, 2021 by Earthshine My resources are limited. You must ask the right questions
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