,           ,
 /             \ 
((__-^^-,-^^-__))
 `-_---' `---_-'
  `--|o` 'o|--'     TWiki . Codedev
     \  `  /
      ): :(
      :o_o:
       "-"
::: PythonAndMSAgent ( vs. r1.1) :::
Search: 
  TWiki . Codedev . PythonAndMSAgent  Printable  Edit page  View page  More :::
Logged in as TWikiGuest

OSIMS

Codedev
WebChanges
WebIndex
WebNotify
WebStatistics

People

TWiki System

Sandbox


 <<O>>  Difference Topic PythonAndMSAgent (r1.1 - 22 May 2003 - DarrylVanDorp)
Added:
>
>

%META:TOPICINFO{author="DarrylVanDorp" date="1053631860" format="1.0" version="1.1"}% 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


Revision -
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.