,           ,
 /             \ 
((__-^^-,-^^-__))
 `-_---' `---_-'
  `--|o` 'o|--'     TWiki . Codedev
     \  `  /
      ): :(
      :o_o:
       "-"
::: PythonAndMSAgent :::
Search: 
  TWiki . Codedev . PythonAndMSAgent # Edit # Attach # Diffs # Printable # More :::
Logged in as TWikiGuest

OSIMS

Codedev
WebChanges
WebIndex
WebNotify
WebStatistics

People

TWiki System

Sandbox


Use python COM to control MS Agent


import sys
from win32com.client import constants
import win32com.client
import time
Agent = win32com.client.Dispatch("Agent.Control.2")
Agent.Connected = 1
Agent.Characters.Load("Merlin",
"C:\WINNT\MSAGENT\CHARS\MERLIN.ACS")
Merlin=Agent.Characters("Merlin")
Merlin.Show()
print "Type word or phrase, then enter."
print "Ctrl+Z then enter (dos/win32) or Ctrl+D (unix) to exit."
while 1:
   try:
      s = raw_input()
      if s=='EXIT': sys.exit()
      Merlin.Speak(s)
   except:
      raise

# Edit menu  


Revision r1.1 - 22 May 2003 - 19:31 GMT - DarrylVanDorp

Copyright © 2000 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.

SourceForge