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" <lists3717@comcast.net>

Subject:

 RE: kdPass And kdProcess

Date:

 Sun, Jun 17, 2012 1:12:47 pm
Hi Rick,

This is not what I'm seeing. Below is a VBScript example, which shows you
receiving the onKeyDown and up events, passing kdProcess as the disposition,
and I see WE speak as normal and the underlying program behaves as normal,
and my app speaks some extra text showing me that it got the onKey events:

Option Explicit
' this example shows keyboard onKeyDown and up and how they allow normal
processing while your app knows what's happening.

Dim myKeyEvent1, myKeyEvent2


' now can trap the key down and up events for this key

myKeyEvent1 = ConnectEvent(keyboard, "onKeyDown", "onKeyDown")
myKeyEvent2 = ConnectEvent(keyboard, "onKeyUp", "onKeyUp")

Speak "for 15 seconds this app will note each key down and up"

sleep 15 * 1000
disconnect myKeyEvent1
disconnect myKeyEvent2
Speak "no further on key handling"





Sub speakText(msg)
Speak msg
End Sub

Function onKeyDown(ByVal VirtualKeyCode, ByVal KeyModifiers)
' event handler

onKeyDown = kdProcess ' handle as normal

End Function



Function onKeyUp(ByVal VirtualKeyCode, ByVal KeyModifiers)
' event handler

onKeyUp = kdProcess ' handle as normal
queue "speakText", "key up"

End Function








________________________________

From: RicksPlace [mailto:ofbgmail@mi.rr.com]
Sent: Sunday, June 17, 2012 8:44 AM
To: gw-scripting@gwmicro.com
Subject: Re: kdPass And kdProcess


Hi Bruce: I want to know if WE is suppose to speak the underlying
text of objects when kdPass and kdProcess are used.
For example:
I open VB.net 2010 Express and my script is loaded and active.
There is a TreeView displayed.
When I do not use the OnKeyDown and OnKeyUp each item in the tree is
read as i hit the up or down cursor.
When I use kdPass and kdProcess nothing is read of the TreeView when
I cursor up and down the tree items.
There is not any code in the event handlers.
First, is this normal behavior?
Rick
From: BT <mailto:bronx_lab@fltg.net>

To: gw-scripting@gwmicro.com
Sent: Sunday, June 17, 2012 7:34 AM
Subject: Re: kdPass And kdProcess


Hi Rick,

I am guessing at this but the KDPass would not look at
what you have inside the key, go on it's merry way and the KDProcess may
actually be too late to do anything since it is after the key has been
processed. It is a tricky issue and I suspect that doing something during
the key up and down is not possible, just do something after that and do the
best you can to get something done.

Maybe during the key event at least capture the ID's and
do something afterwards, like using the events for such thing as window
opening, closing, focus ...

Those events are part of the MSAA event list and see
where it takes you.

Do this by using the WE Event app monitoring to see what
gets displayed per event you have chosen to monitor. I suspect you need to
do this first instead of guessing. Find out what is in fact being triggered,
opened, or shut down...

Once you know that process and can flag it, when that
event gets triggered, then do something!


Bruce


Sent: Sunday, June 17, 2012 6:11 AM
Subject: kdPass And kdProcess


Hi I get unexpected results with OnKeyUp and
OnKeyDown using the kdPass and kdProcess enums:
When a script handles a keyboard OnKeyDown or up...
I have kdPass and the underlying program seems to
respond to keystrokes (I can see SolutionExplorer displayed and hidden upon
the proper keystrokes) but WindowEyes speaks nothing.
With kdProcess nothing seems to be getting through
to the underlying program and WindowEyes speaks nothing.
I filter the keyboard input
on the running process id.
I have no code inside the
event handlers.
I used WEEvent and it looks like the OnKeyDown and
OnKeyUp events are being captured by WeEvent but WindowEyes speaks nothing
for kdPass and nothing for kdProcess and with kdProcess seems to lock up the
keyboard for most navigation and other keys although I can minimize the
program but most keys do nothing including alt-f4 which should close the
application.
I have to shut down the computer to stop the
program.
Is this the normal behavior of the kdPass and
kdProcess
enums?
Do I have to do my own WindowEyes Speech for both or
is WindowEyes suppose to be speaking when kdPass and, or, kdProcess is being
used?
Should kdProcess not allow commands through to the
underlying target program and not speak anything without explicit code to do
these things?
Rick USA