Path: news.graphite.sh!not-for-mail From: "Damian Hodgkiss" Newsgroups: thirty4i.graphite.snippets Subject: Adding voice recognition to your theme Date: Mon, 10 Jan 2000 20:00:58 +1030 Organization: thirty4 interactive Lines: 34 Message-ID: <85cdd8$mut$1@thirty4.com> NNTP-Posting-Host: 202.0.75.45 X-Trace: thirty4.com 947501288 23517 202.0.75.45 (10 Jan 2000 10:48:08 GMT) X-Complaints-To: usenet@thirty4.com NNTP-Posting-Date: 10 Jan 2000 10:48:08 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Xref: news.graphite.sh thirty4i.graphite.snippets:8 First, make sure you have Microsoft Agent and the Speech Recognition Engine (6mb) installed // First we initialize MS Agent and load Merlin up var agent = new ActiveXObject('Agent.Control.2'); agent.Connected = true; agent.Characters.Load('merlin', 'c:\\winnt\\msagent\\chars\\merlin.acs'); var merlin = agent.Characters('merlin'); merlin.Show(); // Now we add a new command called run merlin.Commands.Add('run', 'Run', '(run|run dialog)', true, true); shell.LoadScript('JScript', shell.GetShellPath()+'\\themes\\'+shell.GetThemeName()+'\\commands.js'); we need to have our commands object in another script, because at the present time the 'agent' event doesn't exist. in commands.js add the following: function agent::Command(c) { switch(c.Name) { case 'run': parseGlobalCommand(runDlg); break; } } now just hold down your scroll lock key to merlin listens and say run or run dialog.. i you figure out howto get rid of the need for scroll lock, let me know.