Another good request for a macro came in the other day, this time from Brian (Thanks Brian). Here's what he wanted: A macro that can tell him the weather forecast.

Once you install this macro, you'll be able to say things like "What is the weather like in Redmond", or "Tell me the weather forecast for Redmond". It's only got a few cities in it right now, but you should be able to expand it to have as many cities as you care about.

Check it out here:

<?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">

            var xml_doc = new ActiveXObject("Microsoft.XMLDOM");
            xml_doc.async = false;
            xml_doc.load("http://www.rssweather.com/zipcode/{[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>