The GW-Scripting list is a discussion list for information regarding the development and use of Window-Eyes scripts. Any subscriber of the GW-Scripting list has the ability to post on-topic messages.

From:

 Chip Orange

Subject:

 RE: read date picker correctly

Date:

 Thu, Jul 15, 2010 4:32:28 pm
charset="iso-8859-1"

Richard,

are you the programmer of the system with the date picker?

I don't see anything obviously wrong with this script, however, I know that
if you use a date picker from the ms set of standard controls, WE reads each
portion of the date and time just fine.

is it possible you're registering many many handlers for the cursor keys,
and they aren't getting unregistered? that could possibly explain the
slowing down and then the crash eventually. If you are counting on the
speak commands to help you track when these are registered and unregistered,
some unintended silence command or keystroke interruption may be suppressing
these messages, so you may want to use msgbox commands.

hth,

Chip


_____

From: Richard Emling [mailto:richard@dlinfo.de]
Sent: Wednesday, July 14, 2010 5:26 AM
To: gw-scripting@gwmicro.com
Subject: read date picker correctly


Hi Scripters.

I have a problem with a script that is intended to read each single value of
a date picker field when cursoring through it. When used without the script,
Windoweyes just reads the whole field, when altering a single value (day,
month, yeahr) by pressing the cursorkeys up and down. This script is
intended to just read the actual highlighted portion of the date picker
field. That means, when you change the day, just the days value is spoken.
Here the actual script:


Dim myCursorKeyLeft : Set myCursorKeyLeft = Nothing
Dim myCursorKeyRight : Set myCursorKeyRight = Nothing
Dim myCursorKeyUp : Set myCursorKeyUp = Nothing
Dim myCursorKeyDown : Set myCursorKeyDown = Nothing
regged = 0

ConnectEvent ClientInformation.Overlap, "OnChildSummary", "MyOnChildFocus"

Sub MyOnChildFocus(win)
If win.type = "11" and regged = 0 Then
Set myCursorKeyLeft = Keyboard.RegisterCursorKey("Left Arrow",
"LeftRightCursorSub",win,win)
Set myCursorKeyRight = Keyboard.RegisterCursorKey("Right Arrow",
"LeftRightCursorSub",win,win)
Set myCursorKeyUp = Keyboard.RegisterCursorKey("Up Arrow",
"UpDownCursorSub",win,win)
Set myCursorKeyDown = Keyboard.RegisterCursorKey("Down Arrow",
"UpDownCursorSub",win,win)
regged = 1
speak "hotkeys registered"
else
If win.type "11" and regged = 1 Then
MyCursorKeyLeft.Unregister
MyCursorKeyRight.Unregister
MyCursorKeyUp.Unregister
MyCursorKeyDown.Unregister
regged = 0
speak "hotkeys released"
end if
End If


End Sub

Sub LeftRightCursorSub(win)
If win.control.id = 1302 or 1761 Then
speak highlight.clipstext
End If
End Sub

Sub UpDownCursorSub(win)
If win.control.id = 1302 or 1761 Then
speak highlight.clipstext
End If
End Sub


Now my problem:

When having this script active for a while in my desired application,
Windoweyes crashes, the computer reacts very slowly to every keypress, and
even NVDA- wich i use as backup engine, is affected by the sluggishness.
What can I do to fix this?

By the way, this script was originally written by Handshake and has been
slightly modifyd by Ralf Kefferpütz. Just to state correct ownerships.

Best

Richard