[python-win32] win32com.client and microsoft agent question

Hameed Khan hameedkhaan at yahoo.com
Thu Mar 11 02:56:44 EST 2004


Hi,
 i want to control microsoft agent from python. i try
look microsoft documentation and come up with the
following code but it gives me errors i am pasting the
log from interactive shell session.

##### CODE BEGINS ######

>>> import win32com.client as wincom
>>> wincom
<module 'win32com.client' from
'D:\Python\lib\site-packages\win32com\client\__init__.pyc'>
>>> ag = wincom.Dispatch("Agent.Control")
>>> charac = ag.Character("peedy")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"D:\PYTHON\Lib\site-packages\win32com\client\dynamic.py",
line 477, in __getattr__
    raise AttributeError, "%s.%s" % (self._username_,
attr)
AttributeError: Agent.Control.Character
>>> charac = ag.Characters("peedy")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"D:\PYTHON\Lib\site-packages\win32com\client\dynamic.py",
line 471, in __getattr__
    raise pythoncom.com_error, details
pywintypes.com_error: (-2147352567, 'Exception
occurred.', (0, 'Agent.Control.2', 'Microsoft Agent
was unable to start.\nVerify that Microsoft Agent is
properly installed.', None, 0, -2147212030
), None)
>>> charac = ag.Characters.Load("peedy")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"D:\PYTHON\Lib\site-packages\win32com\client\dynamic.py",
line 471, in __getattr__
    raise pythoncom.com_error, details
pywintypes.com_error: (-2147352567, 'Exception
occurred.', (0, 'Agent.Control.2', 'Microsoft Agent
was unable to start.\nVerify that Microsoft Agent is
properly installed.', None, 0, -2147212030
), None)
>>>

#### CODE END ####

i need just pointer of what kind of error is it.
becuase i have porperly installed microsoft agents it
works well with other applications line mIRC and
others. All your comments, suggestions and help will
be much appreciated.

Thanks,
Hameed


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com



More information about the Python-win32 mailing list