Topics

UIAEventIdsToNVDAEventNames - missing events

Karl-Otto Rosenqvist
 

Hi!
I'm digging around in the NVDA source in order to understand how it works and I was hoping on beeing able to use the general UIAutumationEvent to hook into the UIA_Selection_InvalidatedEvent but after finding the IUIAutomationEventHandler_HandleAutomationEvent event handler in _UIAHandler.py my hopes drained.

NVDAEventName=UIAEventIdsToNVDAEventNames.get(eventID,None)
if not NVDAEventName:
return

The UIAEventIdsToNVDAEventNames dictionary doesn't contain the event id I was looking for and therefore I think I'm stuck.

Is that a correct observation or can I hook into the general UIAutomation event a different way?
Could anyone explain why the mentioned dictionary is limited to a certain set of event ids and thus limiting the developers who would like to extend NVDA?

Hopefully it's my lack of knowledge of Python and NVDA programming that comes to light here.


Kind regards

Karl-Otto

--
Karl-Otto Rosenqvist
Mawingu
Orgnr: 750804-3937
0701- 75 98 56
karl-otto@...
https://mawingu.se

 

Hi,
In the past, certain events were excluded out of performance concerns (the
most notable one being text change event). IN theory, you can add events to
that dictionary and instruct UIA handler object/thread to keep an eye on the
new event (this is how Windows 10 App Essentials add-on adds missing
events). If your willing, I'll let you see what I just described in action
with Windows 10 App Essentials add-on 19.11 in November, or if you want,
take a look at:
https://github.com/josephsl/wintenapps
Cheers,
Joseph

-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Karl-Otto
Rosenqvist
Sent: Thursday, October 17, 2019 1:08 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] UIAEventIdsToNVDAEventNames - missing events

Hi!
I'm digging around in the NVDA source in order to understand how it works
and I was hoping on beeing able to use the general UIAutumationEvent to hook
into the UIA_Selection_InvalidatedEvent but after finding the
IUIAutomationEventHandler_HandleAutomationEvent event handler in
_UIAHandler.py my hopes drained.

NVDAEventName=UIAEventIdsToNVDAEventNames.get(eventID,None)
if not NVDAEventName:
return

The UIAEventIdsToNVDAEventNames dictionary doesn't contain the event id I
was looking for and therefore I think I'm stuck.

Is that a correct observation or can I hook into the general UIAutomation
event a different way?
Could anyone explain why the mentioned dictionary is limited to a certain
set of event ids and thus limiting the developers who would like to extend
NVDA?

Hopefully it's my lack of knowledge of Python and NVDA programming that
comes to light here.


Kind regards

Karl-Otto

--
Karl-Otto Rosenqvist
Mawingu
Orgnr: 750804-3937
0701- 75 98 56
karl-otto@...
https://mawingu.se

Karl-Otto Rosenqvist
 

You are my hero!
Thaaaanks so very much. It was a breeze to get it up and running. Ok, I had to struggle a little with the init method for the app module but I found out what to declare by downloading the add-on for Notepad++. I knew that that was for a certain application so I was able to find what I was looking for.


Cheers!

Karl-Otto

Karl-Otto Rosenqvist
Mawingu
Orgnr: 750804-3937
0701- 75 98 56
karl-otto@...
https://mawingu.se

Den 2019-10-17 kl. 22:16, skrev Joseph Lee:

Hi,
In the past, certain events were excluded out of performance concerns (the
most notable one being text change event). IN theory, you can add events to
that dictionary and instruct UIA handler object/thread to keep an eye on the
new event (this is how Windows 10 App Essentials add-on adds missing
events). If your willing, I'll let you see what I just described in action
with Windows 10 App Essentials add-on 19.11 in November, or if you want,
take a look at:
https://github.com/josephsl/wintenapps
Cheers,
Joseph
-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Karl-Otto
Rosenqvist
Sent: Thursday, October 17, 2019 1:08 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] UIAEventIdsToNVDAEventNames - missing events
Hi!
I'm digging around in the NVDA source in order to understand how it works
and I was hoping on beeing able to use the general UIAutumationEvent to hook
into the UIA_Selection_InvalidatedEvent but after finding the
IUIAutomationEventHandler_HandleAutomationEvent event handler in
_UIAHandler.py my hopes drained.
NVDAEventName=UIAEventIdsToNVDAEventNames.get(eventID,None)
if not NVDAEventName:
return
The UIAEventIdsToNVDAEventNames dictionary doesn't contain the event id I
was looking for and therefore I think I'm stuck.
Is that a correct observation or can I hook into the general UIAutomation
event a different way?
Could anyone explain why the mentioned dictionary is limited to a certain
set of event ids and thus limiting the developers who would like to extend
NVDA?
Hopefully it's my lack of knowledge of Python and NVDA programming that
comes to light here.
Kind regards
Karl-Otto