Re: window eyes scripting

  • From: Jared Wright <wright.jaredm@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Wed, 10 Jun 2009 05:18:42 -0400

On 6/9/2009 12:52 PM, Haden Pike wrote:
1. How do I assign a keystroke to launch the script?
You register a hotkey using the registerHotkey method of the Keyboard object, like this. dim MyHotkey : set MyHotkey = Keyboard.registerHotkey("Alt-Control-X", "Test") // The first parameter specifies the specifics of your keystroke, the second parameter indicates the subroutine called when it is pressed

sub Test()
    speak "You pressed the hotkey."
End sub

2. How can I retrieve information from the internet with a script?
That depends on how the information you're getting is stored. The Weather Or Not script connects retrieve XML data from a weather service. The Lookup Term script I believe uses more webpage scraping type methods. I know for certain the weather script is very well commented, as are all the scripts GW Micro releases, so taking a look at those should give you some ideas. Beyond that, I'd need to know more about exactly what you're trying to retrieve from the internet for your script.

\JW

Other related posts: