I'm not sure how to use it in Delphi, but the XML that djScript is using is the direction I'd encourage you to go. In your XML quoted above, you don't want to have the inner PROPNAME's. You want to basically have a generic property name that you can look up and see what it's value is, so you can launch that program.Originally Posted by 0l33l
For example:
Then, when you get a recognition event from SAPI, you can look at the rule id and/or name, and first see that it's the runApp rule (probably in your case statement). Then, you'll call a function in your code that is specific to running an application, passing the result into it. Inside there, you'll know that there will be a semantic property named "appToRun" and it'll have values like "taskmgr.exe", "notepade.exe", or "c:\program files\MediaCar\MEDIACAR.exe". You'll extract that string value from the property, and simply execute it.Code:<RULE NAME="runApp" ID="RID_RunApp" TOPLEVEL="ACTIVE"> <P>open</P> <L PROPNAME="appToRun"> <P VALSTR="taskmgr.exe">task manager</P> <P VALSTR="notepad.exe">notepade</P> <P VALSTR="C:\Program Files\MediaCar\MEDIACAR.exe">media car</P> </L> <O>...</O> </RULE>
You'll be able to view it in IE and other XML viewers without having them get upset. Future versions of SAPI may do better XML validation and require that the XML be well formed, too.Originally Posted by 0l33l



LinkBack URL
About LinkBacks
I definatly recommend it!






I take that you have a USB hub somewere upfront were you're just going to plug the mic in... right 


Bookmarks