Jay,
What about hooking the MSAAEventSource's OnObjectFocus event instead of
Window's OnChildFocus?
Aaron
Macarty, Jay {PBSG} wrote:
In one of my scripts, I am trying to obtain the accessible.name and
accessible.value for the currently focused control when I press down
arrow. I have the following Keyboard registration
Dim myDownArrow : Set myDownArrow = Keyboard.RegisterHotkey("Down
Arrow", "OnDownArrow", ClientInformation.ApplicationProcess)
In my Sub OnDownArrow() routine, I have tried the following:
Silence
Speak FocusedWindow.Accessible.Name & " is " &
FocusedWindow.Accessible.Value
However, it looks like FocusedWindow is, at this point, not the specific
control that has focus (e.g. a List Item); rather, it seems to be the
client window for the application.
Any suggestions here? Do I need to loop through the clips and see what
has focus or some such process as that?
NOTE: The reason I am going with the RegisterCursorKey is so I can grab
the keystroke before it is processed by the application. Simply
connecting to the OnFocus event gets me the appropriate window but
doesn’t let me take an action before the regular process for that
keystroke does.
--
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.
Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development