Current edition: Vol.5, No.2, February 2002

Active Worlds News
Bot of the Month
3D Homepages
Tech Support Tip
Report Cards
Hot Spots to Visit
AWEC Calendar
AWTeen Contest
Valentine Garden
JPG Yard


Building Links
Community Links










Bot Of The Month Club

The StockQuoteBot (written by HamFon) has been a fixture in the AWGate world for a long time. It provides stock quote prices by answering whispered queries from any citizen in the area. To use it, you whisper 0:MSFT - or pick another stock symbol.

Hamfon & The Hambots

How does StockQuoteBot work? Where does it get the stock quotes? StockQuoteBot starts by receiving a whispered query from a citizen. It takes that query and separates the stock symbol. Then, using HTTP ("The Web"), it submits a web page form query to - pretending to be Internet Explorer. The URL submitted is: Normally, Yahoo returns a full page of information about a stock, in a table form. By specifying the d=v1 and o=t parameters, StockQuoteBot is asking Yahoo for a simplified web page, and in regular text, not a table. StockQuoteBot then reads the response from Yahoo. Remember, StockQuoteBot is pretending to be Internet Explorer, so Yahoo just sends back the URL request as a web page. StockQuoteBot searches all of the web page that was returned from Yahoo, and picks out the part that it's looking for - the stock price. If you look at the source code from the above web page, you will find that the price is BOLD (surrounded by <b> and </b>) - and that it's the only bold that is preceded by several spaces. StockQuoteBot knows what to look for on the web page, and it searches the response from Yahoo for anything that is in bold and preceded by a few spaces. StockQuoteBot also knows that once it has found the price quote, the end of the price quote is identified by the next '<' symbol. StockQuoteBot "screen-scrapes" the web page, gets the price quote, and then whispers the answer back to the citizen who asked.

What else does StockQuoteBot do? Actually, StockQuoteBot is really WebFormBot, just renamed. WebFormBot is a generic bot that reads specifications for web pages (it can handle a bunch of different web pages all at the same time), and then queries citizens by way of whispers in AW to get the information to fill out a web 'form' (which may contain several input fields), and then submits the form, parses the reply, and displays the result to the citizen. The WebFormBot running in the HamGlaze world demonstrates other web page features. For example, try this bot out to send a text message to someone you know with a Sprint PCS cell phone:

  • Teleport to HamGlaze world - WebFormBot will whisper a greeting to you
  • Whisper help to get a list of commands that WebFormBot accepts
  • Whisper list to find out what forms this WebFormBot has been set up to handle
  • Form #0 is the same as available from StockQuoteBot in AWGate - whisper 0:MSFT to get a quote for Microsoft. Notice that you whisper the form number, a colon, then the data needed for the form.
  • Form #1 is the one we want to send text message to someone's Sprint PCS cell phone - whisper start:1 to WebFormBot
  • WebFormBot responds back with a whisper asking for a response to 'Message to Send' - whisper your message
  • WebFormBot then asks for 'Cell Number' - whisper back the 10-digit Sprint PCS cell phone number
  • At this point, WebFormBot submits your inputs to a Sprint PCS web page, and waits for a response
  • There are two responses you should get - either "Sent Message" or "could not be submitted for delivery". These messages come from the response web page that Sprint PCS returns after submitting a message to send - and they are parsed out of the web page by WebFormBot

Currently, WebFormBot handles Text and Hidden input fields. Future enhancements include processing of radio buttons, checkboxes, comboboxes, and multi-line text fields. Also, processing of abbreviated cellphone (HDML - Handheld Device Markup Language) and and Palm Pilot pages (web clipping) would be nice to do.

If you have any questions, please contact HamFon .


  Active Worlds   |   Newsletter Home   |   Newsletter Archive   |   Contact Us    |   Disclaimer