Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

AutoIt and Python - Limited Functions

python com limited functions

  • Please log in to reply
7 replies to this topic

#1 ryushi5

ryushi5

    Seeker

  • New Members
  • 2 posts

Posted 30 August 2011 - 04:42 AM

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







#2 ryushi5

ryushi5

    Seeker

  • New Members
  • 2 posts

Posted 30 August 2011 - 05:03 AM

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

#3 aymhenry

aymhenry

    Seeker

  • Active Members
  • 29 posts

Posted 28 November 2011 - 12:15 PM

but it is a very good idea Python call Autoit.

#4 rubyruy

rubyruy

    Seeker

  • New Members
  • 1 posts

Posted 07 December 2011 - 06:41 PM

Sooooo what was the problem?



Posted Image

#5 JohnOne

JohnOne

    John

  • Active Members
  • PipPipPipPipPipPip
  • 13,109 posts

Posted 13 December 2011 - 04:45 AM

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

AutoIt Absolute Beginners Require a serial
 
 
OMG! Women are the cows of people.


#6 Picard

Picard

    Seeker

  • Normal Members
  • 1 posts

Posted 21 August 2013 - 01:27 AM

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 !



#7 JohnOne

JohnOne

    John

  • Active Members
  • PipPipPipPipPipPip
  • 13,109 posts

Posted 21 August 2013 - 10:45 PM

What functions can you get to work?


AutoIt Absolute Beginners Require a serial
 
 
OMG! Women are the cows of people.


#8 Alek5andr

Alek5andr

    Seeker

  • Normal Members
  • 1 posts

Posted 14 March 2014 - 03:36 PM

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.







Also tagged with one or more of these keywords: python, com, limited, functions

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users