Jump to content
Sign in to follow this  
taro8

Need some help wit windows speech recognitiuon macros for Arma 2

Recommended Posts

Hello everyone, I would like to ask for a help in making an advanced WSR macros for Arma 2. I already did very crude and basic macros, but they arent very comofortable in use. To order 2 to hold fire you need to do this: Say "Two", wait for 2 to be selected and then say "hold fire' to actually order 2 to hold fire. Cumbersome and takes a bit to long. I would like to just say "Two, hold fire". I do not have much experience in advanced WSRM, but I found this:

<?xml version="1.0" encoding="utf-8"?> 
<speechMacros> 
   <command> 
       <listenFor>what is the weather like in [CityName]</listenFor> 
       <run command="http://www.weather.com/weather/local/{[CityName.zipCode]}"/> 
   </command> 

   <command> 
       <listenFor>Tell me the weather forecast for [CityName]</listenFor> 
       <speak>OK</speak> 
       <script language="JScript"> 
         <![CDATA[
           var xml_doc = new ActiveXObject("Microsoft.XMLDOM"); 
           xml_doc.async = false; 
           xml_doc.load("http://www.rssweather.com/zipcode/{[spoken.CityName.zipCode]}/rss.php");

           var titles = xml_doc.getElementsByTagName("title"); 
           var descriptions = xml_doc.getElementsByTagName("description"); 

           Application.Speak(titles.item(2).text + " in {[*CityName]}"); 
           Application.Speak(descriptions.item(2).text); 
         ]]>
       </script> 
   </command> 

   <listenForList name="CityName" propname="zipCode"> 
       <item propval="45255">Cincinnati</item> 
       <item propval="98075">Sammamish</item> 
       <item propval="98052">Redmond</item> 
       <item propval="98004">Bellevue</item> 
       <item propval="98101">Seattle</item> 
   </listenForList> 

</speechMacros>

As you can see the [CityName] is a veriable that can be inserted into the command. This means you can have a command "[unitName] stay frosty" to switch that unit into the aware combat mode. However I do not know how to code this. Any ideas?

WSRM wiki: http://archive.msdn.microsoft.com/wsrmacros/Wiki/View.aspx?title=Windows%20Speech%20Recognition%20Macros%20Wiki

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×