<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type='text/xsl' href='http://windowsliveagents.spaces.live.com/mmm2008-05-17_13.22/rsspretty.aspx?rssquery=en-US;http%3a%2f%2fwindowsliveagents.spaces.live.com%2ffeed.rss' version='1.0'?><rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:msn="http://schemas.microsoft.com/msn/spaces/2005/rss" xmlns:live="http://schemas.microsoft.com/live/spaces/2006/rss" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows Live Agents</title><description>Conversational applications for the web and IM--Official Site for Windows Live Agents</description><link>http://windowsliveagents.spaces.live.com/</link><language>en-US</language><pubDate>Sat, 05 Jul 2008 21:15:17 GMT</pubDate><lastBuildDate>Sat, 05 Jul 2008 21:15:17 GMT</lastBuildDate><generator>Microsoft Spaces v1.1</generator><docs>http://www.rssboard.org/rss-specification</docs><ttl>60</ttl><live:identity><live:id>6615020277961094708</live:id><live:alias>windowsliveagents</live:alias></live:identity><image><title>Windows Live Agents</title><url>http://blufiles.storage.live.com/y1pz8ZRmNWkvpPkmPj11BrtkLER0mYp_7EDwx-KwE4GQErKH5EN8E9RAS2ag9vZbivC</url><link>http://windowsliveagents.spaces.live.com/</link></image><cf:listinfo><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="typelabel" label="Type" /><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="tag" label="Tag" /><cf:group element="category" label="Category" /><cf:sort element="pubDate" label="Date" data-type="date" default="true" /><cf:sort element="title" label="Title" data-type="string" /><cf:sort ns="http://purl.org/rss/1.0/modules/slash/" element="comments" label="Comments" data-type="number" /></cf:listinfo><item><title>Guidelines for Testing your Agent</title><link>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!694.entry</link><description>&lt;div&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt;As compared to Web sites and traditional software applications, conversational agents are subject to some unique policy compliance risks. These risks arise because:&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;End users’ interactions with agents are freeform and unpredictable.&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Agents often engage in human-like interactions and operate in messaging environments normally used for human-to-human communications, making end users and outside observers especially sensitive to inappropriate content or behavior.&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt;Because of these unique risks, the Windows Live Agents team highly recommends that each Agent undergo manual testing for policy compliance prior to launching. Once testers have acquainted themselves with the task, approximately &lt;b style=""&gt;4 to 8 hours of manual testing&lt;/b&gt; should provide a reasonable evaluation of the Agent’s policy compliance. Testers should:&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Be native speakers&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Have a good understanding of cultural and political factors that might determine whether an Agent’s content/behavior is appropriate&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Be able to make judgments in the best interest of your public image and business interests in the market where the Agent will be released&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Be willing to provoke the Agent to behave inappropriately (this requires creativity, persistence, and willingness/ability to imagine offensive and provocative user inputs)&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Understand the Agent’s feature set&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Ideally &lt;i&gt;not&lt;/i&gt;&lt;/font&gt;&lt;font size=3&gt; have been directly involved in the Agent’s development&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt;If your testing uncovers any issues that you need help triaging or fixing, please contact Windows Live Agents Partner Support (agentsu@microsoft.com). Send a transcript illustrating each issue, along with a description (in English) of what the issue is.&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Cambria color="#365f91" size=5&gt;Overview for Testers&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt;This document is intended to provide guidelines and advice for manual testing of Agents for policy compliance. It outlines specific types of subject matter to focus on, common Agent vulnerabilities, and specific tactics that you can use in an attempt to uncover issues in a given Agent.&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt;This document is &lt;b&gt;&lt;i&gt;not&lt;/i&gt;&lt;/b&gt; &lt;b&gt;&lt;i&gt;a step-by-step test plan&lt;/i&gt;&lt;/b&gt;; nor is it by any means exhaustive. When performing compliance testing, there &lt;b&gt;&lt;i&gt;is no substitute for your own persistence and imagination&lt;/i&gt;&lt;/b&gt;. Furthermore, these guidelines &lt;i&gt;do not&lt;/i&gt; currently prescribe any specific standards. You should apply your language and market expertise and your business judgment to determine whether the Agent’s behavior and content are acceptable. We strongly advise erring on the side of caution.&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt;You should read this document to acquaint yourself with the subject of Agent policy compliance. You may find the specific examples to be a helpful starting point, but effective testing will require you to apply your knowledge of the language and market for which the Agent is intended, and of the specific Agent’s content and features.&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt;In order to test effectively, &lt;b style=""&gt;&lt;i style=""&gt;you must be willing and able to imagine and try highly offensive and provocative user inputs&lt;/i&gt;&lt;/b&gt;. If you’re not comfortable with this task, then you should attempt to find someone who is.&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt;Once you have acquainted yourself with the task, approximately 4-8 hours of manual testing should provide a reasonable evaluation of the Agent’s policy compliance.&lt;/font&gt;
&lt;h1 style="margin:24pt 0in 0pt"&gt;&lt;font face=Cambria color="#365f91" size=5&gt;Sensitive/Inappropriate subject matter to test&lt;/font&gt;&lt;/h1&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Profanity&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Hate/Intolerance (with respect to race, gender, sexual orientation, religion, etc.)&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Violence and criminal behavior&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Drug use&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Sexual content&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Suicide&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Culturally/Politically sensitive subjects in your market&lt;/font&gt;&lt;/font&gt;
&lt;h1 style="margin:24pt 0in 0pt"&gt;&lt;font face=Cambria color="#365f91" size=5&gt;Scenarios to test&lt;/font&gt;&lt;/h1&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Imagine you are one of the Agent’s target users&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Imagine you are a child&lt;/font&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Imagine you are a malicious user attempting to provoke inappropriate Agent behavior&lt;/font&gt;&lt;/font&gt;
&lt;h1 style="margin:24pt 0in 0pt"&gt;&lt;font face=Cambria color="#365f91" size=5&gt;Common Agent vulnerabilities&lt;/font&gt;&lt;/h1&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Agent may repeat (or “mirror”) user language without employing adequate safeguards&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Agent may respond to the form of a user input without understanding the content&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Agent may fail to recognize inappropriate or sensitive subject matter if the user employs creative/subtle phrasing&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Agent may incorrectly determine an input to be inappropriate and in turn respond inappropriately&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Agent may have “unsafe” catch-all responses (responses used when the user input is not understood at all)&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;h1 style="margin:24pt 0in 0pt"&gt;&lt;font face=Cambria color="#365f91" size=5&gt; &lt;/font&gt;&lt;/h1&gt;
&lt;h1 style="margin:24pt 0in 0pt"&gt;&lt;font face=Cambria color="#365f91" size=5&gt;Some specific tactics to try&lt;/font&gt;&lt;/h1&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;See how the Agent responds to blatant abuse and provocation&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Try to trick the agent into repeating an inappropriate word or phrase&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Try to elicit an inappropriate opinion from the Agent&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Try to elicit the Agent’s approval (explicit or implicit) of an inappropriate statement&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Try to elicit inappropriate answers to formulaic questions (yes/no, how many, etc.)&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Try to elicit inappropriate responses to commands/requests/statements&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span style="font-family:Symbol"&gt;&lt;span style=""&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Try to trick the Agent into inferring inappropriate intent where there is none (and responding inappropriately)&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=6615020277961094708&amp;page=RSS%3a+Guidelines+for+Testing+your+Agent&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=windowsliveagents.spaces.live.com&amp;amp;GT1=windowsliveagents"&gt;</description><comments>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!694.entry#comment</comments><guid isPermaLink="true">http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!694.entry</guid><pubDate>Wed, 02 Jul 2008 21:15:18 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://windowsliveagents.spaces.live.com/blog/cns!5BCD45E519E07634!694/comments/feed.rss</wfw:commentRss><wfw:comment>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!694.entry#comment</wfw:comment><dcterms:modified>2008-07-02T21:15:18Z</dcterms:modified></item><item><title>It's all about context, part deux!</title><link>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!693.entry</link><description>&lt;div&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;Hi again! Here is the second part of our visit to the magical world of contexts. Yesterday we brushed on a few simple uses for them, now let's dive into a slightly more sensitive subject.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt;  &lt;/span&gt;Once the agent is hosted and public, you may want to block access to the agent temporarily, for instance if you rely heavily on external data sources that are experiencing an outage or just very slow.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;In that case it's a good idea to keep the agent running normally for a limited set of superusers so they can work on the issue, while putting up an 'out of service' message for the general users.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;//The message is by default empty. If it's not then the agent knows that we want it muted.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;variable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.OUTAGE_MESSAGE = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;context&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; AgentIsDisabled {out-of-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;0&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; in-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;1000&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; condition=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;!IsSuperUser() &amp;amp;&amp;amp; PUBLIC.OUTAGE_MESSAGE ne \&amp;quot;\&amp;quot;&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;start&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; AgentIsDisabled&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ &lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;=AnythingStrong&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- &lt;/span&gt;&lt;font color="#000000"&gt;PUBLIC&lt;/font&gt;&lt;span style="color:red"&gt;.&lt;/span&gt;&lt;font color="#000000"&gt;OUTAGE_MESSAGE&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;end&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; AgentIsDisabled&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// SuperUsers only an change the agent status. Easy! We've already prepared for that.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;start&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; RestrictedStrings&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ disable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;agent&lt;/span&gt;&lt;font color="#000000"&gt; REASON=AnythingRaw&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.OUTAGE_MESSAGE = REASON&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ enable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;agent&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.OUTAGE_MESSAGE = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;end&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; RestrictedStrings&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt;  &lt;/span&gt;Here the condition is simply to check if the outage message is empty or not, except for super users. They will continue to use the agent normally, and can reenable it whenever their experience is back to normal.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;Now, there is one problem in this code... did you spot it?&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;Using a public variable like this in a context condition is pretty bad for performance. Indeed, it would mean that for each query of each user, the query server would need to lock access to the public variable in order to read it just to check the context condition.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;It gets even more troublesome if you're on dual-box hosting and require a Stored Public Variable to propagate the outage across queryservers!&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;What is the solution then?&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt; &lt;/span&gt;One possible solution is to check the outage variable only once: at session start. All you need for this is to keep a local session variable of that setting.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;stored&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;variable&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.STORED_OUTAGE_MESSAGE = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;variable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; G_OUTAGE_MESSAGE = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;procedure&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:purple"&gt;ABStartSessionProc&lt;/span&gt;&lt;font color="#000000"&gt;()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;&lt;span style=""&gt;  &lt;/span&gt;// This procedure can exist independently in any buddyscript file, and is called at session start&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; !&lt;/font&gt;&lt;span style="color:navy"&gt;IsSuperUser&lt;/span&gt;&lt;font color="#000000"&gt;()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;lock&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;profile&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:green"&gt;// locking is required for stored public variables.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;      &lt;/span&gt;G_OUTAGE_MESSAGE = &lt;/font&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.STORED_OUTAGE_MESSAGE&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;context&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; AgentIsDisabled {out-of-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;0&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; in-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;1000&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; condition=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;G_OUTAGE_MESSAGE ne \&amp;quot;\&amp;quot;&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;} &lt;/font&gt;&lt;span style="color:green"&gt;//note that we don't need to check for SuperUsers here as as it's done at session start&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;start&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; AgentIsDisabled&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ &lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;=AnythingStrong&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- &lt;/span&gt;&lt;font color="#000000"&gt;G_OUTAGE_MESSAGE&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;end&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; AgentIsDisabled&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;start&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; RestrictedStrings&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ disable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;agent&lt;/span&gt;&lt;font color="#000000"&gt; REASON=AnythingStrong&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;lock&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;profile&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.STORED_OUTAGE_MESSAGE = REASON&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ enable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;agent&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;lock&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;profile&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.STORED_OUTAGE_MESSAGE = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;end&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; RestrictedStrings&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt;  &lt;/span&gt;As you may have noticed, there is a caveat to this solution: since we only check the message at session start, the flag takes some time to propagate as only new users will be getting the message.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;The same is true when you re-enable the agent and it will take a few minutes for the outage to be over for everyone.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt;  &lt;/span&gt;So here, we only lock the agent's profile and check the public stored variable once for every session, which is good already. But can we do better?&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;Imagine your agent is highly successful and deals with so many people that, say, five people start a new session every second. Don't we all dream of having an agent that popular! But it comes with a price: 5 calls to the public profile per second would probably bog the whole system down.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt;  &lt;/span&gt;What do you do then? Well, add yet another layer of buffering of course!&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;Back to our friend the &amp;quot;basic&amp;quot; public variable. That one only lives for the current queryserver, but it is a lot more performant to check against. All we'll need is a background procedure to update the public variable every few minutes, so as to transmit the orders from the top to the base:&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;stored&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;variable&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.STORED_OUTAGE_MESSAGE_FOR_ALL_USERS = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;variable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;        &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.OUTAGE_MESSAGE_FOR_ALL_USERS_OF_THIS_SERVER = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;variable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;        &lt;/span&gt;G_OUTAGE_MESSAGE_FOR_THIS_USER = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;procedure&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:purple"&gt;Background_UpdateOutageMessage&lt;/span&gt;&lt;font color="#000000"&gt;() &lt;/font&gt;&lt;span style="color:blue"&gt;startup&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;every&lt;/span&gt;&lt;font color="#000000"&gt; 1 &lt;/font&gt;&lt;span style="color:blue"&gt;minute&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;&lt;span style=""&gt;  &lt;/span&gt;// This procedure is called at startup and every minute, independently of any user session.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;lock&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;profile&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.OUTAGE_MESSAGE_FOR_ALL_USERS_OF_THIS_SERVER = &lt;/font&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.STORED_OUTAGE_MESSAGE_FOR_ALL_USERS&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;procedure&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:purple"&gt;ABStartSessionProc&lt;/span&gt;&lt;font color="#000000"&gt;()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; !&lt;/font&gt;&lt;span style="color:navy"&gt;IsSuperUser&lt;/span&gt;&lt;font color="#000000"&gt;()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;G_OUTAGE_MESSAGE_FOR_THIS_USER = &lt;/font&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.OUTAGE_MESSAGE_FOR_ALL_USERS_OF_THIS_SERVER&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;context&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; AgentIsDisabled {out-of-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;0&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; in-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;1000&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; condition=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;G_OUTAGE_MESSAGE_FOR_THIS_USER ne \&amp;quot;\&amp;quot;&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;start&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; AgentIsDisabled&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ &lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;=AnythingStrong&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- &lt;/span&gt;&lt;font color="#000000"&gt;G_OUTAGE_MESSAGE_FOR_THIS_USER&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;end&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; AgentIsDisabled&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;start&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; RestrictedStrings&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ disable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;agent&lt;/span&gt;&lt;font color="#000000"&gt; REASON=AnythingStrong&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.STORED_OUTAGE_MESSAGE_FOR_ALL_USERS = REASON&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ enable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;agent&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;PUBLIC&lt;/span&gt;&lt;font color="#000000"&gt;.STORED_OUTAGE_MESSAGE_FOR_ALL_USERS = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;end&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; RestrictedStrings&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt;  &lt;/span&gt;Here you have a piece of code, slighly more complex, but that will sustain any kind of traffic without budging, with the only downside of taking up to one more minute to propagate the change of the agent's status.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt; &lt;/span&gt;And this concludes our two-day tour of contexts and their natural habitat. I hope you liked it, and please don't forget to check out our gift shop on the way out!&lt;/span&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=6615020277961094708&amp;page=RSS%3a+It's+all+about+context%2c+part+deux!&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=windowsliveagents.spaces.live.com&amp;amp;GT1=windowsliveagents"&gt;</description><comments>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!693.entry#comment</comments><guid isPermaLink="true">http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!693.entry</guid><pubDate>Tue, 01 Jul 2008 23:22:10 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://windowsliveagents.spaces.live.com/blog/cns!5BCD45E519E07634!693/comments/feed.rss</wfw:commentRss><wfw:comment>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!693.entry#comment</wfw:comment><dcterms:modified>2008-07-01T23:22:10Z</dcterms:modified></item><item><title>It's all about context!</title><link>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!691.entry</link><description>&lt;div&gt;&lt;font color="#008000" size=2&gt;&lt;font color="#008000" size=2&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt;  &lt;/span&gt;Today we're going to talk a bit about contexts and what wonderful things you can do with them.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;Well, maybe not &amp;quot;Wall-E opening sequence&amp;quot; wonderful, but they sure come in handy to control what your agent is doing in an easy and trouble-free way. With the help of contexts you can separate clearly your routines according to any condition, without having to worry about micro-managing their scores or doing systematic checks.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;We're going to take a closer look at a few different uses and related buddyscript features, from the very simple to... the wee bit advanced. Tomorrow we'll explore another use for them, and discuss public variables and performance issues.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;Here is how, for example, you could make sure that only users on MSN get access to the activity window features:&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:green;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;context&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; MSN_Only {out-of-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;0&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; in-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;100&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; condition=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;SYS.User.Service eq \&amp;quot;MSN\&amp;quot;&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// out-of-context: score adjustment for the queries inside the context that don't verify the condition (here,&lt;span style=""&gt;   &lt;/span&gt;0 = no match)&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// in-context&lt;span style=""&gt;    &lt;/span&gt;: score adjustment for the queries inside the context that do verify the condition&lt;span style=""&gt;    &lt;/span&gt;(here, 100 = no adjustment)&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;start&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; MSN_Only&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;? Start&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;the&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;activity.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Sending you an invitation...&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;end&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; MSN_Only&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt; &lt;/span&gt;An interesting thing to note is that you don't have to end the context at the end of our file. If you were to start the context in a package, then every domain including this package, directly or indirectly, would be within that context and abide by its rules. So here you could have all domains related to Activity Window include this package, and be protected automatically.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt;  &lt;/span&gt;You could apply this principle to restrict certain features or queries based on any condition, like age, country, market, number of visits or what the user's high-score is at your quizz game.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;You can also restrict access to the agent even though it's launched and live on Messenger, while it's in development or beta phase:&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// This table lists the screennames of authorized users&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// Using &amp;quot;exact&amp;quot; as an index method will help make searches more performant&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;datatable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; AuthorizedUsers&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;load&lt;/span&gt;&lt;font color="#000000"&gt; ScreenName {index=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;exact&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;} &lt;/font&gt;&lt;span style="color:blue"&gt;from&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;mememe@hotmail.com&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;uberbetatester@live.com&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;popaandmoma@live.com&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;mygloriousboss@live.com&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;function&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:navy"&gt;UserIsAuthorized&lt;/span&gt;&lt;font color="#000000"&gt;()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; ShellMode() &lt;/font&gt;&lt;span style="color:green"&gt;// Shellmode() returns true if we're in the SDK&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;return&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;SN = &lt;/font&gt;&lt;span style="color:blue"&gt;get&lt;/span&gt;&lt;font color="#000000"&gt; ScreenName &lt;/font&gt;&lt;span style="color:blue"&gt;in&lt;/span&gt;&lt;font color="#000000"&gt; AuthorizedUsers &lt;/font&gt;&lt;span style="color:blue"&gt;where&lt;/span&gt;&lt;font color="#000000"&gt; ScreenName &lt;/font&gt;&lt;span style="color:blue"&gt;is&lt;/span&gt;&lt;font color="#000000"&gt; SYS.User.ScreenName&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;&lt;span style=""&gt;    &lt;/span&gt;// Found the screename: access granted!&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;return&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;return&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;false&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// Here the in-context is set to 1000 to make sure that any other routine is overruled.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;context&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; Unauthorized {out-of-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;0&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; in-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;1000&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; condition=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;!UserIsAuthorized()&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;start&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; Unauthorized&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ &lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;=AnythingStrong&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Sorry, &lt;/span&gt;&lt;font color="#000000"&gt;I&lt;/font&gt;&lt;span style="color:red"&gt;'m in closed beta phase and can't talk to you yet. No peeping!&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// Within a context, regular matching still happens as they're all subject to the same adjustment.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;? But&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; I &lt;/font&gt;&lt;span style="color:maroon"&gt;am&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;a&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;Very&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;Important&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;Person!&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- The Boss said: no exceptions.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;end&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; Unauthorized&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;&lt;span style=""&gt;  &lt;/span&gt;Another use, very similar in implementation, is to restrict certain debug or testing queries to a set of super-users, listed this time in a text file. The textfile-based table is easier to maintain independently from the code, and can be changed without having to restart the agent: all you need is to set an expire date for the file to be reloaded.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;datatable&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; SuperUsers {expire=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;in one day&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;&lt;span style=""&gt;  &lt;/span&gt;// The list will be timed out and reloaded once a day from the file.&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;load&lt;/span&gt;&lt;font color="#000000"&gt; ScreenName {index=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;exact&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;} &lt;/font&gt;&lt;span style="color:blue"&gt;from&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;file&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;superusers.txt&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;function&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:navy"&gt;IsSuperUser&lt;/span&gt;&lt;font color="#000000"&gt;()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; ShellMode() &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;return&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;SN = &lt;/font&gt;&lt;span style="color:blue"&gt;get&lt;/span&gt;&lt;font color="#000000"&gt; ScreenName &lt;/font&gt;&lt;span style="color:blue"&gt;in&lt;/span&gt;&lt;font color="#000000"&gt; SuperUsers &lt;/font&gt;&lt;span style="color:blue"&gt;where&lt;/span&gt;&lt;font color="#000000"&gt; ScreenName &lt;/font&gt;&lt;span style="color:blue"&gt;is&lt;/span&gt;&lt;font color="#000000"&gt; SYS.User.ScreenName&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;return&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;return&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;false&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;context&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; RestrictedStrings {out-of-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;0&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; in-context=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;100&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt; condition=&lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;IsSuperUser()&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;start&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;context&lt;/span&gt;&lt;font color="#000000"&gt; RestrictedStrings&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// This topic is only accessible to the right people:&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;+ debug&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;all&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;variables&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- As you wish.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;dbg_display&lt;/span&gt;&lt;font color="#000000"&gt; STORED_USER_VARIABLES&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:12pt;color:black;font-family:'Times New Roman','serif'"&gt;That’s it for today. See you tomorrow for another round of goodies!&lt;/span&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;&lt;/span&gt;
&lt;p&gt; &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=6615020277961094708&amp;page=RSS%3a+It's+all+about+context!&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=windowsliveagents.spaces.live.com&amp;amp;GT1=windowsliveagents"&gt;</description><comments>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!691.entry#comment</comments><guid isPermaLink="true">http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!691.entry</guid><pubDate>Tue, 01 Jul 2008 04:31:27 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://windowsliveagents.spaces.live.com/blog/cns!5BCD45E519E07634!691/comments/feed.rss</wfw:commentRss><wfw:comment>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!691.entry#comment</wfw:comment><dcterms:modified>2008-07-01T04:31:27Z</dcterms:modified></item><item><title>5.0 Transition Update!</title><link>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!678.entry</link><description>&lt;div&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;span style="color:#1f497d"&gt;&lt;font size=3&gt;&lt;font face="Arial Narrow"&gt;&lt;font color="#1f497d"&gt;Hello Developers and Partners of Windows Live Agents, &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;span style="color:#1f497d"&gt;&lt;font size=3&gt;&lt;font face="Arial Narrow"&gt;&lt;font color="#1f497d"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p style="margin:0in 0in 0pt"&gt;&lt;span style="color:#1f497d"&gt;&lt;font size=3&gt;&lt;font face="Arial Narrow"&gt;&lt;font color="#1f497d"&gt;We are very excited that 5.0 is here! We have received many questions from all of you regarding the transition from 4.3 to 5.0.  Windows Live Agents Partner Support is no longer accepting projects developed in 4.3. All agent projects should be developed in 5.0 using our SDK in Visual Studio and submitted through our Partner hosting site at &lt;a href="http://phi.agents.live.com"&gt;http://phi.agents.live.com&lt;/a&gt;. If you send us a new project developed in 4.3 or 5.0 via email, we will unfortunately not be able to accept it. If you have not already downloaded the 5.0 SDK in Visual Studio, you can do so &lt;a href="http://go.microsoft.com/?linkid=8602072" target="_blank"&gt;here&lt;/a&gt;. For instructions on getting started with hosting, please click &lt;a href="http://msdn.microsoft.com/en-us/library/cc528145.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;span style="color:#1f497d"&gt;&lt;font size=3&gt;&lt;font face="Arial Narrow"&gt;&lt;font color="#1f497d"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;span style="color:#1f497d"&gt;&lt;font size=3&gt;&lt;font face="Arial Narrow"&gt;&lt;font color="#1f497d"&gt;If we are currently hosting an agent of yours that was developed in 4.3, please continue to send us updates in 4.3 via email. We will let you know when we are ready to migrate your project from 4.3 to 5.0.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;span style="color:#1f497d"&gt;&lt;font size=3&gt;&lt;font face="Arial Narrow"&gt;&lt;font color="#1f497d"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;span style="color:#1f497d"&gt;&lt;font size=3&gt;&lt;font face="Arial Narrow"&gt;&lt;font color="#1f497d"&gt;Thanks,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt"&gt;&lt;span style="color:#1f497d"&gt;&lt;font size=3&gt;&lt;font face="Arial Narrow"&gt;&lt;font color="#1f497d"&gt;Windows Live Agents Team&lt;br&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=6615020277961094708&amp;page=RSS%3a+5.0+Transition+Update!&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=windowsliveagents.spaces.live.com&amp;amp;GT1=windowsliveagents"&gt;</description><comments>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!678.entry#comment</comments><guid isPermaLink="true">http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!678.entry</guid><pubDate>Thu, 26 Jun 2008 17:20:29 GMT</pubDate><slash:comments>4</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://windowsliveagents.spaces.live.com/blog/cns!5BCD45E519E07634!678/comments/feed.rss</wfw:commentRss><wfw:comment>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!678.entry#comment</wfw:comment><dcterms:modified>2008-06-26T17:20:29Z</dcterms:modified></item><item><title>Messenger Screen Name Parameters Updater</title><link>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!674.entry</link><description>&lt;div&gt;Quite often we hear from partners who complain that the screen name, personal status message, or display picture of their agent has disappeared from the Messenger client, and ask us to fix it. Strictly speaking, the display of these parameters in the client is subject to forces outside the control of the Windows Live Agents group, however we continue to work with those in charge of the Messenger network to resolve issues like this.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In the meantime, here is the code we use to &amp;quot;fix&amp;quot; the problem. If you are not already doing so, you should be using Method 3 from &lt;a href="http://windowsliveagents.spaces.live.com/blog/cns!5BCD45E519E07634!315.entry" target="_blank"&gt;this blog post about changing friendly names, icons, and status messages&lt;/a&gt;. Updates to these Messenger parameters via edits to the BFG are &lt;u&gt;no longer supported after 4.3!&lt;/u&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;To add the screen name parametes updater, simply include these lines in your project:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;
&lt;div&gt;&lt;/div&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;font face="Courier New" size=2&gt;package &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=2&gt;lib:/Shared/Utilities/WLMUtilities&lt;/font&gt;  &lt;/font&gt;&lt;/font&gt;
&lt;div&gt;&lt;font face="Courier New" color="#000000"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;font face="Courier New" size=2&gt;procedure &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=2&gt;WLMSetUpScreenNameParametersBackground() every 5 minutes per buddy&lt;/font&gt; &lt;/font&gt;&lt;/font&gt;
&lt;div&gt;&lt;font size=2&gt;&lt;font face="Courier New" color="#000000"&gt;  call WLMSetUpScreenNameParameters()&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Courier New" color="#000000"&gt; &lt;/font&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=6615020277961094708&amp;page=RSS%3a+Messenger+Screen+Name+Parameters+Updater&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=windowsliveagents.spaces.live.com&amp;amp;GT1=windowsliveagents"&gt;</description><comments>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!674.entry#comment</comments><guid isPermaLink="true">http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!674.entry</guid><pubDate>Mon, 23 Jun 2008 22:26:12 GMT</pubDate><slash:comments>2</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://windowsliveagents.spaces.live.com/blog/cns!5BCD45E519E07634!674/comments/feed.rss</wfw:commentRss><wfw:comment>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!674.entry#comment</wfw:comment><dcterms:modified>2008-06-23T22:38:52Z</dcterms:modified></item><item><title>Scripting tips: conversations 4/4 Using actions</title><link>http://windowsliveagents.spaces.live.com/Blog/cns!5BCD45E519E07634!597.entry</link><description>&lt;div&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;Greetings,&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;We often design dialogs in BuddyScript to answer to user queries in a specific context. We will see today how by using actions, we can have initiate and notify to answer dialogs, and what can be the use.&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;A dialog is a set of dialog entries that leaves in your script. A dialog entry is some matching information and a script block associated with. The matching information part usually contains patterns, but can contain actions. An action has a name and potentially parameters.&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;The first example is a trivia with timer.&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// Trivia with timer&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;? Play&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;trivia&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Let's play trivia&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;in what year was the Eiffel Tower built ?&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt;&lt;span style=""&gt;    &lt;/span&gt;in 1889 {action=Right()}&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt;&lt;span style=""&gt;    &lt;/span&gt;in 1943 {action=Wrong()}&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt;&lt;span style=""&gt;    &lt;/span&gt;in 2001 {action=Wrong()}&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt;&lt;span style=""&gt;    &lt;/span&gt;You have 30 seconds to answer&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;NID = &lt;/font&gt;&lt;span style="color:blue"&gt;notify&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;in&lt;/span&gt;&lt;font color="#000000"&gt; 30 &lt;/font&gt;&lt;span style="color:blue"&gt;seconds&lt;/span&gt;&lt;font color="#000000"&gt;: &lt;/font&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; TimeOut()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:maroon"&gt;? 1889&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; Right()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- That is correct!&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:maroon"&gt;? 1943&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:maroon"&gt;? 2001&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; Wrong()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Nope, the correct answer is 1889.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; TimeOut()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Too late, the correct answer is 1889.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;At first, you can see a common use of actions, and that is with an enumeration. Typing 1 will trigger the action Right, typing 2 or 3 will trigger the action Wrong. Or you can fully type the date and match one of the three patterns.&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;Then, you will notice the action in the notify. After 30 seconds, the notification will answer the dialog for you. If you do respond before the notification triggers, it would be wise to cancel the notification, but if you don’t, that’s ok because when the notification will trigger, no dialog with a TimeOut action will be active and the notification will simply be ignored.&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;Initiates can also use actions, but through the &lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New'"&gt;respond&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt; statement. The syntax is:&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt;text-indent:0.5in"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;RID = &lt;/font&gt;&lt;span style="color:blue"&gt;respond&lt;/span&gt;&lt;font color="#000000"&gt; SOURCE: &lt;/font&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; MyAction(PARAMS)&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;font color="#000000"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;The &lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;SOURCE&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt; is an object that contains the user identity (screenname, service and UID), the buddy id and the conversation id to send the action to. Most of the time, you are coming from an initiate and you simply pass the object from &lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;SYS.ConversationSource&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;. Don’t forget to save that object in a variable if you have a dialog, because this variable won’t survive the dialog.&lt;/span&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;A typical use for this statement is to get information from another user’s profile. In the following example, I have altered the “Do you know my friend” example to display a friendly name that the friend may have provided.&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// Do you know my friend(oh you mean Jacky ?)&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;stored&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;variable&lt;/span&gt;&lt;font color="#000000"&gt; PREFERRED_NAME = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;? Call&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;me&lt;/span&gt;&lt;font color="#000000"&gt; NAME=AnythingRaw&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;PREFERRED_NAME = NAME&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Ok, for now on, &lt;/span&gt;&lt;font color="#000000"&gt;I&lt;/font&gt;&lt;span style="color:red"&gt; will call you &lt;/span&gt;&lt;font color="#000000"&gt;PREFERRED_NAME&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;procedure&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:purple"&gt;GetPreferredName&lt;/span&gt;&lt;font color="#000000"&gt;()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; PREFERRED_NAME = &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;NAME = SYS.User.ScreenName&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;else&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;NAME = PREFERRED_NAME&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;CID = &lt;/font&gt;&lt;span style="color:blue"&gt;respond&lt;/span&gt;&lt;font color="#000000"&gt; SYS.ConversationSource: &lt;/font&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; SetName(NAME)&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;? Do&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;you&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;know&lt;/span&gt;&lt;font color="#000000"&gt; EMAIL=AnEMailAddress &lt;/font&gt;&lt;span style="color:maroon"&gt;?&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;RESULT_NOLOAD = &lt;/font&gt;&lt;span style="color:blue"&gt;initiate&lt;/span&gt;&lt;font color="#000000"&gt; EMAIL, &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;MSN&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;: GetPreferredName() {createprofile=&lt;/font&gt;&lt;span style="color:blue"&gt;false&lt;/span&gt;&lt;font color="#000000"&gt; loadprofile=&lt;/font&gt;&lt;span style="color:blue"&gt;false&lt;/span&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; RESULT_NOLOAD.Delivered&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;IN_SESSION = &lt;/font&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;else&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;IN_SESSION = &lt;/font&gt;&lt;span style="color:blue"&gt;false&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;RESULT_LOAD = &lt;/font&gt;&lt;span style="color:blue"&gt;initiate&lt;/span&gt;&lt;font color="#000000"&gt; EMAIL, &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;MSN&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;: GetPreferredName() {createprofile=&lt;/font&gt;&lt;span style="color:blue"&gt;false&lt;/span&gt;&lt;font color="#000000"&gt; loadprofile=&lt;/font&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; !RESULT_LOAD.Delivered&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;      &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Sorry, &lt;/span&gt;&lt;font color="#000000"&gt;I&lt;/font&gt;&lt;span style="color:red"&gt; can't say that &lt;/span&gt;&lt;font color="#000000"&gt;I&lt;/font&gt;&lt;span style="color:red"&gt; do&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;      &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;exit&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; SetName(NAME)&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; NAME != EMAIL&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;      &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Oh, you mean &lt;/span&gt;&lt;font color="#000000"&gt;NAME&lt;/font&gt;&lt;span style="color:red"&gt; ? \c&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Yes, &lt;/span&gt;&lt;font color="#000000"&gt;I&lt;/font&gt;&lt;span style="color:red"&gt; know that guy\c&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; IN_SESSION&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;      &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- , and he/she's talking to me right now.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;else&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;      &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- .&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;font color="#000000"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;This script calls &lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;GetPreferredName&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt; under the friend’s profile, this procedure will respond by sending the preferred name. The script will wait in a dialog to get that answer.&lt;/span&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;You can also constantly exchange information back and forth between users with &lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New'"&gt;respond&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;. You just need one &lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New'"&gt;initiate&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt; to initiate the dialog. Here is another example that lets two users chat through the agent.&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;// Chatter&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;declare&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;procedure&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:purple"&gt;InviteToChat&lt;/span&gt;&lt;font color="#000000"&gt;(NAME)&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;declare&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;procedure&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:purple"&gt;Chat&lt;/span&gt;&lt;font color="#000000"&gt;(SRC)&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;? &lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;I &lt;/font&gt;&lt;span style="color:maroon"&gt;want&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;to&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;chat&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:maroon"&gt;with&lt;/span&gt;&lt;font color="#000000"&gt; EMAIL=AnEMailAddress&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Ok, let me invite your friend over&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;CID = &lt;/font&gt;&lt;span style="color:blue"&gt;initiate&lt;/span&gt;&lt;font color="#000000"&gt; EMAIL, &lt;/font&gt;&lt;span style="color:red"&gt;&amp;quot;MSN&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;: InviteToChat(SYS.User.NickName) {createprofile=&lt;/font&gt;&lt;span style="color:blue"&gt;false&lt;/span&gt;&lt;font color="#000000"&gt; loadprofile=&lt;/font&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; Accept()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Ok, your friend has accepted, you may chat now.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;call&lt;/span&gt;&lt;font color="#000000"&gt; Chat(SYS.ConversationSource)&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; Reject()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Sorry, your friend has declined the offer.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; NoResponse()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Hmm, nobody replied...&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:red;font-family:'Courier New'"&gt; &lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;procedure&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:purple"&gt;InviteToChat&lt;/span&gt;&lt;font color="#000000"&gt;(NAME)&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Hey, your friend &lt;/span&gt;&lt;font color="#000000"&gt;NAME&lt;/font&gt;&lt;span style="color:red"&gt; would like to chat with you, do you want to accept ?&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;set&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;user&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;conversation&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;SRC = SYS.ConversationSource&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;  &lt;/span&gt;NID = &lt;/font&gt;&lt;span style="color:blue"&gt;notify&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;in&lt;/span&gt;&lt;font color="#000000"&gt; 30 &lt;/font&gt;&lt;span style="color:blue"&gt;seconds&lt;/span&gt;&lt;font color="#000000"&gt;: &lt;/font&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; TimeOut()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:maroon"&gt;? Yes&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Great, let's start chatting...&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;RID = &lt;/font&gt;&lt;span style="color:blue"&gt;respond&lt;/span&gt;&lt;font color="#000000"&gt; SRC: &lt;/font&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; Accept()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;call&lt;/span&gt;&lt;font color="#000000"&gt; Chat(SRC)&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:maroon"&gt;? No&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Fine.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;RID = &lt;/font&gt;&lt;span style="color:blue"&gt;respond&lt;/span&gt;&lt;font color="#000000"&gt; SRC: &lt;/font&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; Reject()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; TimeOut()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Hmm, you must not be here...&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;RID = &lt;/font&gt;&lt;span style="color:blue"&gt;respond&lt;/span&gt;&lt;font color="#000000"&gt; SRC: &lt;/font&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; NoResponse()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;insist&lt;/span&gt;&lt;font color="#000000"&gt;: Please, say Yes or No.&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;procedure&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:purple"&gt;Chat&lt;/span&gt;&lt;font color="#000000"&gt;(SRC)&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Type &amp;quot;quit&amp;quot; to quit the chat.&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:maroon"&gt;? &lt;/span&gt;&lt;font color="#000000"&gt;TEXT=AnythingRaw&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;RID = &lt;/font&gt;&lt;span style="color:blue"&gt;respond&lt;/span&gt;&lt;font color="#000000"&gt; SRC: &lt;/font&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; SendText(TEXT)&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;restart&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;dialog&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; SendText(TEXT)&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- &lt;/span&gt;&lt;font color="#000000"&gt;TEXT&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;restart&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color:blue"&gt;dialog&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:maroon"&gt;? Quit&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;    &lt;/span&gt;RID = &lt;/font&gt;&lt;span style="color:blue"&gt;respond&lt;/span&gt;&lt;font color="#000000"&gt; SRC: &lt;/font&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; Quit()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- You have terminated the conversation&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;action&lt;/span&gt;&lt;font color="#000000"&gt; Quit()&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 0pt;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:red"&gt;- Your friend has terminated the conversation&lt;/span&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;font color="#000000"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;/span&gt;&lt;/font&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;Have fun with all that.&lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style="margin:0in 0in 10pt"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif'"&gt;&lt;font color="#000000"&gt;damien&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=6615020277961094708&amp;page=RSS%3a+Scripting+tips%3a+conversations+4%2f4+Using+actions&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=7332