![]() |
|
|
![]() |
Once you have downloaded and installed Microsoft Agent, use MS Internet Explorer v3 or later to check out the examples on Microsoft's website. Another website with information about Microsoft Agent is run by Argo Technologies Inc. at www.argolink.com. You can also visit a webpage created to implement a challenge called "Petals Around the Rose" at www.borrett.id.au/computing/petals.htm. On this webpage I've used VBScript to call Microsoft Agent and provide a friendly "genie" to help users taking the challenge. If a lapsed programmer like me can sit down with the Microsoft Agent documentation and produce a result like the "Petals Around the Rose" web page in one afternoon, it must be easy. Just how easy? Well here's a sample piece of VBScript: 'Make the page client active MyAgent.Active = True On Error Resume Next'Move the Agent and play the introduction MyAgent.MoveTo 320, 90, True MyAgent.Play "Greet" MyAgent.Speak "Welcome to Petals Around the Rose." The MoveTo method is used to move the Agent around the screen. No rocket science here. The Play method plays the defined action and its associated animation. Currently there are some 28 animation sequences such as Acknowledge, Confused, Explain, GestureLeft, GlanceDown, Read, Sad, Surprised and Think. It really is that simple. The Speak method uses the speech output engine to speak the specified text. The Microsoft Agent can also maintain a list of commands that are currently available to the user. The user can use voice input or left mouse click on the Agent to access the commands. The Commands object is built using the Add or Insert method. Here's an example: '------------------------------------------------- '-- InitializeCommands '-- '-- This method creates the commands '-- Petals Around the Rose will use. '-- '------------------------------------------------- SUB InitializeCommands'Disable the Commands object MyAgent.Commands.Enabled = False 'Add the Order button MyAgent.Commands.Add "Roll","Roll","...[please] roll [the] [(dice|die)]" MyAgent.Commands.Add "Hint","Hint","...[please] [give] [me] [a] (hint|help) [please]" MyAgent.Commands.Add "Guess",,"...[accept] guess" MyAgent.Commands.AddSeparator "Gap" MyAgent.Commands.Add "Zero","Zero","(zero|0|oh)" MyAgent.Commands.Add "One",,"(one|1)" MyAgent.Commands.Add "Two","Two","(two|2)" . . (you can easily fill in the lines of code that were here) . MyAgent.Commands.Add "Nineteen",,"(nineteen|19)" MyAgent.Commands.Add "Twenty","Twenty","(twenty|20)" MyAgent.Commands.Enabled = TrueEND SUB It really is that easy to add such a useful new interface to your programs. And you should see the look of amazement on the faces of users when they see Microsoft Agent in action! Microsoft plans to release information on how to create your own characters for Microsoft Agent. So soon we're likely to have a selection of characters to choose from. What's the down side? Well I guess the percentage of business PCs with a sound card, speakers and microphone is still not high and an office full of people talking to their Windows programs could be noisy. But this configuration is becoming more common in home PCs. Plus, even without speech recognition and/or speech output active, the Microsoft Agent is still a valuable addition to the user interface. It can be a bit tedious adding in appropriate sets of responses to be randomly chosen so as to keep the user dialogue more fresh and interesting. For example:
But wouldn't it be great if all onorous programming chores were that difficult! Well hopefully this introduction to Microsoft Agent has made you interested enough to download it and at least visit some of the websites mentioned so that you can see Agent in action. Then it will only be a case of exercising your imagination and deciding just how you can use Microsoft Agent to improve the user interface of your programs. [ Top ]
Local time: 2:01 am Friday 5 December 2025
|
COMPUTING
> computing platforms > web design > petals around the rose > articles > simulation > games |