Hi Rick,
I was wondering what you mean by returning Int32, for the keyboard callback
has the key code and the modifier key values returned. Both should be integers
because they never exceed a value of 256, or at least well below 32575...
Now, if the MSAA event is not returning anything inside the WE Event app,
then what you are looking for is not on the WE Event list, thus not even seen
by WE.
As I had said before, there is a asyncronous event that the keyboard sends
to WMI because the keyboard itself is syncronous and has not time to stay there
and wait; for the timer tick count is used to clock all keyboards matrices.
So, if you have set all WE Events to selected and nothing is coming back
then were dealing still with that same WMI event.
I sent you the example to test MSAA events and all you have to do is modify
it to monitor all 4 keyboard events by having a subroutine for each MSAA
keyboard event and Queue in a voice message for all 4 events.
So in each event you get some kind of verbal message.
Let me know if you have tried that; remember, you can activate it by
holding down Control-Shift-4 keys. Once activated the next keystroke would be
what you have wanted in terms of some kind of monitoring.
Bruce
Sent: Tuesday, June 19, 2012 11:32 AM
Subject: Re: OnKeyDown And OnKeyUp Returned DataType Question
Hi Again:
I used an Object.TypeCode statement to get the
WindowEyes.KeyDisposition.kdProcess data type and it was int32 which is Integer
in vb.net.
So, I changed the function data type returned from WindowEyes.KeyDisposition
type to Integer but this appears to have no effect on the problem.
So this test seems a dead end.
I am waiting to hear if WE uses the value returned from a script's OnKeyDown
function handler directly as int32 or what it may be converted to internally by
the WindowEyes code.
But, at least now I have a clue that my script is returning a int32 value of
2 from it's OnKeyDown and OnKeyUp Event Handler Functions for the kdProcess
Enum.
If WindowEyes is expecting an int32 value then the problem is likely
outside my script and outside WindowEyes processing of the returned code but
still could be in some WE message processing code or other MS Marshalling code
or just COM gremlins sucking the life out of me.
Rick USA
----- Original Message -----
From: RicksPlace
To: [email protected]
Sent: Tuesday, June 19, 2012 8:25 AM
Subject: OnKeyDown And OnKeyUp Returned DataType Question
Hi Guys:
In my ongoing OnKeyDown and OnKeyUp saga I am trying to analyze what might
be going on.
What is the actual Data Type as used in the WE COM DLL or Engine or
whatever of the
WindowEyes.KeyDisposition enum
variable?
Are the actual values expected to be returned to WindowEyes used as
integers (short, long, byte or whatever) or some type of terminated or
not-terminated string and, if so, what type?
In my code I have:
Dim AppropriateDisposition As WindowEyes.KeyDisposition
AppropriateDisposition = WindowEyes.KeyDisposition.kdProcess
Return AppropriateDisposition
This code will apparently allow KeyUp and KeyDown events to be logged
properly to the WEEvent Viewer but the MSAA and other Events which are suppose
to be triggered by these Keys upon a key press are not being logged to the
WEEvent viewer nor spoken by WindowEyes as they should be from my understanding.
It sounds like perhaps WindowEyes is getting the Key Press messages and
trying to process them except that it might not know what to do with the
message after getting it back from my script - just a wild guess from a novice
but all I have at this point.
One thing that might cause this could be that the vb.net IML or internal
marshalling operations are not passing the correct data type to WindowEyes upon
returnning from a OnKeyDown and, or, OnKeyUp Event handler function if
necessary.
So, if I know exactly what system 32, or whatever, data type is expected
and how it is used I might be able to pick a corresponding data type and use
MarshalAs Attribute to try and return it.
Thanks:
Rick USA