Hi list,
I refined my script for MSDN Library for Visual Studio 2008 a bit. The
search results list box now speaks and displays in braille. I also now
use the WindowType property and not the ClassName since I discovered
that the ClassName is not always reliable in this application.
This script can be useful until GW solves the problem with this list box
in the next version of WE.
Here is the script. All comments welcome.
option explicit
Dim registeredKeys : Set registeredKeys =
CreateObject("Scripting.Dictionary")
ConnectEvent ClientInformation.Overlap, "OnChildFocus", "RegisterMyKeys"
ConnectEvent ClientInformation.Overlap, "OnChildBlur",
"UnregisterMyKeys"
Sub RegisterMyKeys(windowObj)
If windowObj.type = wtlistbox Then
ActiveSettings.Braille.Options.QuickMessageMode = bqmonwithnotimeout
Set registeredKeys.Item(1) = Keyboard.RegisterCursorKey("Down
Arrow","SpeakText")
Set registeredKeys.Item(2) = Keyboard.RegisterCursorKey("Up
Arrow","SpeakText")
Set registeredKeys.Item(3) =
Keyboard.RegisterCursorKey("Home","SpeakText")
Set registeredKeys.Item(4) =
Keyboard.RegisterCursorKey("End","SpeakText")
End If
End Sub
Sub UnregisterMyKeys(windowObj)
dim i
If windowObj.type = wtlistbox Then
ActiveSettings.Braille.Options.QuickMessageMode = bqmonwithtimeout
For i = 1 To registeredKeys.Count
Eval(registeredKeys(i).Unregister)
Next
registeredKeys.RemoveAll
End If
End Sub
Sub SpeakText
Sleep 1000
Speak FocusedWindow.Control.Text
End Sub
Regards.
Charles Steyn