The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

xpl voice context question


  • Subject: xpl voice context question
  • From: "rleong1" <rleong1@xxxxxxxxx>
  • Date: Mon, 23 May 2005 17:16:35 -0000

when xpl voice starts up, the context is "" (null or undefined?) 
if i
give a command to go to a different context then want to get back to
the default context, how do i send it back a null?  since i don't know
how to get it back to that null context, i send it to the
"command"
context.

now, i have checks for the default context "" and for a
"command"
context, but they're identical.  is there a way i can avoid this?
(either be able to set the context to null or have xpl voice come up
in the "command" context)

my code as it is now:


sub TONYT_VOICE_MACHINE_TRIGGER(XplMsg)
dim instance
instance = "TONYT-VOICE.MACHINE"
vcommand = GetCommand(XplMsg)
Select Case ucase(xpl.GetParam(XplMsg,"context",True))
'**
'** no context defined so we're in main context
'**
Case ""
'** export_to_xml_main: commands
if (FindCommand("lightlightslighting",vcommand)) then
TTSResponse "lighting mode",host
SetContext "lights",host
...
Case "COMMANDS.XML"
if (FindCommand("lightlightslighting",vcommand)) then
TTSResponse "lighting mode",host
SetContext "lights",host
...




xPL Links: http://www.xplproject.org.uk http://www.xplhal.com http://www.xpl.myby.co.uk
To Post a Message: ukha_xpl@xxxxxxx
To Subscribe:  ukha_xpl-subscribe@xxxxxxx
To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx

xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.