Topics

UIA: monitoring a list view for new items


Bill Dengler
 

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


 

Hi,

What does AccEvent and Windows 10 App Essentials add-on in debug mode (restarting NVDA with debug logging enabled) tell you about events fired by the message list/items? Apart from structure change event (which we don’t care about), the way I did for old UWP Skype app module was to look at events from other UIA elements and announce the last message accordingly (a variant of this algorithm was implemented to let NVDA announce text responses from Cortana 2 in Version 2004).

Which apps are you writing app modules for?

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:17 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] UIA: monitoring a list view for new items

 

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


Bill Dengler
 

What is AccEvent?

Unigram (Telegram) and Dell Mobile Connect (iMessage).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:27
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

What does AccEvent and Windows 10 App Essentials add-on in debug mode (restarting NVDA with debug logging enabled) tell you about events fired by the message list/items? Apart from structure change event (which we don’t care about), the way I did for old UWP Skype app module was to look at events from other UIA elements and announce the last message accordingly (a variant of this algorithm was implemented to let NVDA announce text responses from Cortana 2 in Version 2004).

Which apps are you writing app modules for?

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:17 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] UIA: monitoring a list view for new items

 

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


 

Hi,

AccEvent is a Windows SDK tool that will report accessibility events generated by MSAA/UIA servers (apps and controls). I usually resort to using AccEvent if I need information for new events and/or investigate certain events further. For the most part, I use Windows 10 App Essentials add-on debug printout for UIA event tracking.

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:28 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

What is AccEvent?

Unigram (Telegram) and Dell Mobile Connect (iMessage).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:27
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

What does AccEvent and Windows 10 App Essentials add-on in debug mode (restarting NVDA with debug logging enabled) tell you about events fired by the message list/items? Apart from structure change event (which we don’t care about), the way I did for old UWP Skype app module was to look at events from other UIA elements and announce the last message accordingly (a variant of this algorithm was implemented to let NVDA announce text responses from Cortana 2 in Version 2004).

Which apps are you writing app modules for?

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:17 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] UIA: monitoring a list view for new items

 

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


Bill Dengler
 

OK, I’ve installed the latest version of the Windows 10 app essentials add-on and set my log level to “debug”. To test, I opened up cmd (with UIA console), ran some commands, and looked at the NVDA log, but I don’t see any UIA events. I’d expect to see several textChange events if the add-on is writing to the NVDA log. Where are UIA events logged?

 

Thanks,

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:31
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

AccEvent is a Windows SDK tool that will report accessibility events generated by MSAA/UIA servers (apps and controls). I usually resort to using AccEvent if I need information for new events and/or investigate certain events further. For the most part, I use Windows 10 App Essentials add-on debug printout for UIA event tracking.

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:28 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

What is AccEvent?

Unigram (Telegram) and Dell Mobile Connect (iMessage).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:27
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

What does AccEvent and Windows 10 App Essentials add-on in debug mode (restarting NVDA with debug logging enabled) tell you about events fired by the message list/items? Apart from structure change event (which we don’t care about), the way I did for old UWP Skype app module was to look at events from other UIA elements and announce the last message accordingly (a variant of this algorithm was implemented to let NVDA announce text responses from Cortana 2 in Version 2004).

Which apps are you writing app modules for?

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:17 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] UIA: monitoring a list view for new items

 

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


 

Hi,

The debug printout will not show up if you just set log level to debug – you must restart NVDA with debug logging enabled (the last option in Exit NVDA dialog unless an update is pending). This choice is intentional – it eases debugging by letting users restart with a dedicated debug logging mode without having to set log level to debug. The debug printout will then show up via log viewer and the text starts with “W10: “.

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:38 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

OK, I’ve installed the latest version of the Windows 10 app essentials add-on and set my log level to “debug”. To test, I opened up cmd (with UIA console), ran some commands, and looked at the NVDA log, but I don’t see any UIA events. I’d expect to see several textChange events if the add-on is writing to the NVDA log. Where are UIA events logged?

 

Thanks,

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:31
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

AccEvent is a Windows SDK tool that will report accessibility events generated by MSAA/UIA servers (apps and controls). I usually resort to using AccEvent if I need information for new events and/or investigate certain events further. For the most part, I use Windows 10 App Essentials add-on debug printout for UIA event tracking.

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:28 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

What is AccEvent?

Unigram (Telegram) and Dell Mobile Connect (iMessage).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:27
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

What does AccEvent and Windows 10 App Essentials add-on in debug mode (restarting NVDA with debug logging enabled) tell you about events fired by the message list/items? Apart from structure change event (which we don’t care about), the way I did for old UWP Skype app module was to look at events from other UIA elements and announce the last message accordingly (a variant of this algorithm was implemented to let NVDA announce text responses from Cortana 2 in Version 2004).

Which apps are you writing app modules for?

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:17 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] UIA: monitoring a list view for new items

 

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


Bill Dengler
 

Works, thanks!

Seems the list items send nameChange events, but not the list itself. I think I can work with that.

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:44
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

The debug printout will not show up if you just set log level to debug – you must restart NVDA with debug logging enabled (the last option in Exit NVDA dialog unless an update is pending). This choice is intentional – it eases debugging by letting users restart with a dedicated debug logging mode without having to set log level to debug. The debug printout will then show up via log viewer and the text starts with “W10: “.

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:38 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

OK, I’ve installed the latest version of the Windows 10 app essentials add-on and set my log level to “debug”. To test, I opened up cmd (with UIA console), ran some commands, and looked at the NVDA log, but I don’t see any UIA events. I’d expect to see several textChange events if the add-on is writing to the NVDA log. Where are UIA events logged?

 

Thanks,

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:31
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

AccEvent is a Windows SDK tool that will report accessibility events generated by MSAA/UIA servers (apps and controls). I usually resort to using AccEvent if I need information for new events and/or investigate certain events further. For the most part, I use Windows 10 App Essentials add-on debug printout for UIA event tracking.

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:28 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

What is AccEvent?

Unigram (Telegram) and Dell Mobile Connect (iMessage).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:27
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

What does AccEvent and Windows 10 App Essentials add-on in debug mode (restarting NVDA with debug logging enabled) tell you about events fired by the message list/items? Apart from structure change event (which we don’t care about), the way I did for old UWP Skype app module was to look at events from other UIA elements and announce the last message accordingly (a variant of this algorithm was implemented to let NVDA announce text responses from Cortana 2 in Version 2004).

Which apps are you writing app modules for?

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:17 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] UIA: monitoring a list view for new items

 

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


Bill Dengler
 

Nope, even that isn’t consistent: you have to focus the list once first, and even that doesn’t guarantee you’ll get name change events. To get them consistently you need to scroll the list.

Any other ideas?

 

Thanks,

Bill

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler via Groups.Io
Sent: 26 March 2020 01:57
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Works, thanks!

Seems the list items send nameChange events, but not the list itself. I think I can work with that.

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:44
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

The debug printout will not show up if you just set log level to debug – you must restart NVDA with debug logging enabled (the last option in Exit NVDA dialog unless an update is pending). This choice is intentional – it eases debugging by letting users restart with a dedicated debug logging mode without having to set log level to debug. The debug printout will then show up via log viewer and the text starts with “W10: “.

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:38 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

OK, I’ve installed the latest version of the Windows 10 app essentials add-on and set my log level to “debug”. To test, I opened up cmd (with UIA console), ran some commands, and looked at the NVDA log, but I don’t see any UIA events. I’d expect to see several textChange events if the add-on is writing to the NVDA log. Where are UIA events logged?

 

Thanks,

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:31
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

AccEvent is a Windows SDK tool that will report accessibility events generated by MSAA/UIA servers (apps and controls). I usually resort to using AccEvent if I need information for new events and/or investigate certain events further. For the most part, I use Windows 10 App Essentials add-on debug printout for UIA event tracking.

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:28 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

What is AccEvent?

Unigram (Telegram) and Dell Mobile Connect (iMessage).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Joseph Lee
Sent: 26 March 2020 01:27
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hi,

What does AccEvent and Windows 10 App Essentials add-on in debug mode (restarting NVDA with debug logging enabled) tell you about events fired by the message list/items? Apart from structure change event (which we don’t care about), the way I did for old UWP Skype app module was to look at events from other UIA elements and announce the last message accordingly (a variant of this algorithm was implemented to let NVDA announce text responses from Cortana 2 in Version 2004).

Which apps are you writing app modules for?

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Bill Dengler
Sent: Wednesday, March 25, 2020 10:17 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] UIA: monitoring a list view for new items

 

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


 

Hey Bill,


I assume you have used Windows 10 app essentials to track down the fact that you don't receive any events. In that case, for UWP, there's not much else to do other than polling.


Regards,

Leonard

On 26/03/2020 06:16, Bill Dengler wrote:

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


Bill Dengler
 

Yes, that’s what I’ve done.

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Leonard de Ruijter
Sent: 26 March 2020 03:12
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hey Bill,

 

I assume you have used Windows 10 app essentials to track down the fact that you don't receive any events. In that case, for UWP, there's not much else to do other than polling.

 

Regards,

Leonard

On 26/03/2020 06:16, Bill Dengler wrote:

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


Bill Dengler
 

Also, is there a way to remove elements from the tab order? Dell Mobile Connect has several empty elements, so you often have to hit tab three or four times to move between elements (to skip over the blanks).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Leonard de Ruijter
Sent: 26 March 2020 03:12
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hey Bill,

 

I assume you have used Windows 10 app essentials to track down the fact that you don't receive any events. In that case, for UWP, there's not much else to do other than polling.

 

Regards,

Leonard

On 26/03/2020 06:16, Bill Dengler wrote:

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


 

You would have to write a script that overrides the tab and either implement your own tab traversal, or when pressing tab, execute the tab gesture as long as you reached the right element. Both have their advantages and disadvantages.

On 26/03/2020 08:16, Bill Dengler wrote:

Also, is there a way to remove elements from the tab order? Dell Mobile Connect has several empty elements, so you often have to hit tab three or four times to move between elements (to skip over the blanks).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Leonard de Ruijter
Sent: 26 March 2020 03:12
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hey Bill,

 

I assume you have used Windows 10 app essentials to track down the fact that you don't receive any events. In that case, for UWP, there's not much else to do other than polling.

 

Regards,

Leonard

On 26/03/2020 06:16, Bill Dengler wrote:

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


Bill Dengler
 

Thanks!

Is there any way to tell when an application loses focus? I don’t seem to be getting loseFocus events on the main window…

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Leonard de Ruijter
Sent: 26 March 2020 03:28
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

You would have to write a script that overrides the tab and either implement your own tab traversal, or when pressing tab, execute the tab gesture as long as you reached the right element. Both have their advantages and disadvantages.

On 26/03/2020 08:16, Bill Dengler wrote:

Also, is there a way to remove elements from the tab order? Dell Mobile Connect has several empty elements, so you often have to hit tab three or four times to move between elements (to skip over the blanks).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Leonard de Ruijter
Sent: 26 March 2020 03:12
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hey Bill,

 

I assume you have used Windows 10 app essentials to track down the fact that you don't receive any events. In that case, for UWP, there's not much else to do other than polling.

 

Regards,

Leonard

On 26/03/2020 06:16, Bill Dengler wrote:

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


derek riemer
 

event_appModule_loseFocus

On Thu, Mar 26, 2020 at 2:32 AM Bill Dengler <codeofdusk@...> wrote:

Thanks!

Is there any way to tell when an application loses focus? I don’t seem to be getting loseFocus events on the main window…

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Leonard de Ruijter
Sent: 26 March 2020 03:28
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

You would have to write a script that overrides the tab and either implement your own tab traversal, or when pressing tab, execute the tab gesture as long as you reached the right element. Both have their advantages and disadvantages.

On 26/03/2020 08:16, Bill Dengler wrote:

Also, is there a way to remove elements from the tab order? Dell Mobile Connect has several empty elements, so you often have to hit tab three or four times to move between elements (to skip over the blanks).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Leonard de Ruijter
Sent: 26 March 2020 03:12
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hey Bill,

 

I assume you have used Windows 10 app essentials to track down the fact that you don't receive any events. In that case, for UWP, there's not much else to do other than polling.

 

Regards,

Leonard

On 26/03/2020 06:16, Bill Dengler wrote:

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill



--
Derek Riemer
Improving the world one byte at a time!        ⠠⠊⠍⠏⠗⠕⠧⠬ ⠮ ⠸⠺ ⠐⠕ ⠃⠽⠞⠑ ⠁⠞ ⠁ ⠐⠞⠖
•    Accessibility enthusiast.
•    Proud user of the NVDA screen reader.
•    Open source enthusiast.
•    Skier.

•    Personal website: https://derekriemer.com





 

Good point


I believe lose focus is only called on real focus objects. There is no negated version of focusEntered.

If you need to track a lose focus of a main window within the app, event_foreground globally on the module is probably your best friend. Otherwise, there is event_appModule_loseFocus that's called when you move out of the app.

if you look in appModuleHandler.py, there seems to be an event_appLoseFocus event. I think that's a bug and should be event_appModule_loseFocus as well.

On 26/03/2020 09:32, Bill Dengler wrote:

Thanks!

Is there any way to tell when an application loses focus? I don’t seem to be getting loseFocus events on the main window…

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Leonard de Ruijter
Sent: 26 March 2020 03:28
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

You would have to write a script that overrides the tab and either implement your own tab traversal, or when pressing tab, execute the tab gesture as long as you reached the right element. Both have their advantages and disadvantages.

On 26/03/2020 08:16, Bill Dengler wrote:

Also, is there a way to remove elements from the tab order? Dell Mobile Connect has several empty elements, so you often have to hit tab three or four times to move between elements (to skip over the blanks).

 

Bill

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Leonard de Ruijter
Sent: 26 March 2020 03:12
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

 

Hey Bill,

 

I assume you have used Windows 10 app essentials to track down the fact that you don't receive any events. In that case, for UWP, there's not much else to do other than polling.

 

Regards,

Leonard

On 26/03/2020 06:16, Bill Dengler wrote:

Hello,

I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.

It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).

What’s the best way to detect new list items? Do I need to constantly poll the list?

 

Thanks,

Bill


James Scholes
 

Is there an area of the app which displays some information which does update in line with the content of the list view, such as an unread messages indicator or counter? If that fires a change event, you could then respond and check the list view for new content rather than constantly polling it.

Regards,

James Scholes

On 26/03/2020 at 2:32 am, Bill Dengler wrote:
Thanks!
Is there any way to tell when an application loses focus? I don’t seem to be getting loseFocus events on the main window…
Bill
*From:*nvda-devel@groups.io <nvda-devel@groups.io> *On Behalf Of *Leonard de Ruijter
*Sent:* 26 March 2020 03:28
*To:* nvda-devel@groups.io
*Subject:* Re: [nvda-devel] UIA: monitoring a list view for new items
You would have to write a script that overrides the tab and either implement your own tab traversal, or when pressing tab, execute the tab gesture as long as you reached the right element. Both have their advantages and disadvantages.
On 26/03/2020 08:16, Bill Dengler wrote:
Also, is there a way to remove elements from the tab order? Dell
Mobile Connect has several empty elements, so you often have to hit
tab three or four times to move between elements (to skip over the
blanks).
Bill
*From:*nvda-devel@groups.io <mailto:nvda-devel@groups.io>
<nvda-devel@groups.io> <mailto:nvda-devel@groups.io> *On Behalf Of
*Leonard de Ruijter
*Sent:* 26 March 2020 03:12
*To:* nvda-devel@groups.io <mailto:nvda-devel@groups.io>
*Subject:* Re: [nvda-devel] UIA: monitoring a list view for new items
Hey Bill,
I assume you have used Windows 10 app essentials to track down the
fact that you don't receive any events. In that case, for UWP,
there's not much else to do other than polling.
Regards,
Leonard
On 26/03/2020 06:16, Bill Dengler wrote:
Hello,
I’m working on app modules for two UWP messaging apps. In both
cases, messages are presented in list views that can be uniquely
identified by obj.UIAElement.CachedAutomationID. When new
messages arrive, the list view is updated with these messages.
I’d like to have NVDA automatically read these messages, similar
to Skype/Miranda.
It doesn’t seem like any NVDA events are executed when new items
are added to the list, and no textChange events are executed
when subscribing to display model notifications for the list
with displayModel.requestTextChangeNotifications(obj, True).
What’s the best way to detect new list items? Do I need to
constantly poll the list?
Thanks,
Bill


James Scholes
 

The debug printout will not show up if you just set log level to
debug – you must restart NVDA with debug logging enabled (the last option in Exit NVDA dialog unless an update is pending).

This is a weird decision, and not particularly user-friendly if the exit dialog is disabled. Those users would need to first go and enable that dialog, at which point they may as well just turn on debug logging anyway. Suggest a rethink on this one.

Regards,

James Scholes

On 25/03/2020 at 11:44 pm, Joseph Lee wrote:
Hi,
The debug printout will not show up if you just set log level to debug – you must restart NVDA with debug logging enabled (the last option in Exit NVDA dialog unless an update is pending). This choice is intentional – it eases debugging by letting users restart with a dedicated debug logging mode without having to set log level to debug. The debug printout will then show up via log viewer and the text starts with “W10: “.
Cheers,
Joseph
*From:*nvda-devel@groups.io <nvda-devel@groups.io> *On Behalf Of *Bill Dengler
*Sent:* Wednesday, March 25, 2020 10:38 PM
*To:* nvda-devel@groups.io
*Subject:* Re: [nvda-devel] UIA: monitoring a list view for new items
OK, I’ve installed the latest version of the Windows 10 app essentials add-on and set my log level to “debug”. To test, I opened up cmd (with UIA console), ran some commands, and looked at the NVDA log, but I don’t see any UIA events. I’d expect to see several textChange events if the add-on is writing to the NVDA log. Where are UIA events logged?
Thanks,
Bill
*From:*nvda-devel@groups.io <mailto:nvda-devel@groups.io> <nvda-devel@groups.io <mailto:nvda-devel@groups.io>> *On Behalf Of *Joseph Lee
*Sent:* 26 March 2020 01:31
*To:* nvda-devel@groups.io <mailto:nvda-devel@groups.io>
*Subject:* Re: [nvda-devel] UIA: monitoring a list view for new items
Hi,
AccEvent is a Windows SDK tool that will report accessibility events generated by MSAA/UIA servers (apps and controls). I usually resort to using AccEvent if I need information for new events and/or investigate certain events further. For the most part, I use Windows 10 App Essentials add-on debug printout for UIA event tracking.
Cheers,
Joseph
*From:*nvda-devel@groups.io <mailto:nvda-devel@groups.io> <nvda-devel@groups.io <mailto:nvda-devel@groups.io>> *On Behalf Of *Bill Dengler
*Sent:* Wednesday, March 25, 2020 10:28 PM
*To:* nvda-devel@groups.io <mailto:nvda-devel@groups.io>
*Subject:* Re: [nvda-devel] UIA: monitoring a list view for new items
What is AccEvent?
Unigram (Telegram) and Dell Mobile Connect (iMessage).
Bill
*From:*nvda-devel@groups.io <mailto:nvda-devel@groups.io> <nvda-devel@groups.io <mailto:nvda-devel@groups.io>> *On Behalf Of *Joseph Lee
*Sent:* 26 March 2020 01:27
*To:* nvda-devel@groups.io <mailto:nvda-devel@groups.io>
*Subject:* Re: [nvda-devel] UIA: monitoring a list view for new items
Hi,
What does AccEvent and Windows 10 App Essentials add-on in debug mode (restarting NVDA with debug logging enabled) tell you about events fired by the message list/items? Apart from structure change event (which we don’t care about), the way I did for old UWP Skype app module was to look at events from other UIA elements and announce the last message accordingly (a variant of this algorithm was implemented to let NVDA announce text responses from Cortana 2 in Version 2004).
Which apps are you writing app modules for?
Cheers,
Joseph
*From:*nvda-devel@groups.io <mailto:nvda-devel@groups.io> <nvda-devel@groups.io <mailto:nvda-devel@groups.io>> *On Behalf Of *Bill Dengler
*Sent:* Wednesday, March 25, 2020 10:17 PM
*To:* nvda-devel@groups.io <mailto:nvda-devel@groups.io>
*Subject:* [nvda-devel] UIA: monitoring a list view for new items
Hello,
I’m working on app modules for two UWP messaging apps. In both cases, messages are presented in list views that can be uniquely identified by obj.UIAElement.CachedAutomationID. When new messages arrive, the list view is updated with these messages. I’d like to have NVDA automatically read these messages, similar to Skype/Miranda.
It doesn’t seem like any NVDA events are executed when new items are added to the list, and no textChange events are executed when subscribing to display model notifications for the list with displayModel.requestTextChangeNotifications(obj, True).
What’s the best way to detect new list items? Do I need to constantly poll the list?
Thanks,
Bill


 

Hi,
I'll think about that possibility, as it'll affect all my add-ons
(WinTenApps isn't the only one with this capability). Thanks for reminding
me.
Cheers,
Joseph

-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of James Scholes
Sent: Thursday, March 26, 2020 8:16 AM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] UIA: monitoring a list view for new items

> The debug printout will not show up if you just set log level to debug -
you must restart NVDA with debug logging enabled (the last option in Exit
NVDA dialog unless an update is pending).

This is a weird decision, and not particularly user-friendly if the exit
dialog is disabled. Those users would need to first go and enable that
dialog, at which point they may as well just turn on debug logging anyway.
Suggest a rethink on this one.

Regards,

James Scholes

On 25/03/2020 at 11:44 pm, Joseph Lee wrote:
Hi,

The debug printout will not show up if you just set log level to debug
- you must restart NVDA with debug logging enabled (the last option in
Exit NVDA dialog unless an update is pending). This choice is
intentional - it eases debugging by letting users restart with a
dedicated debug logging mode without having to set log level to debug.
The debug printout will then show up via log viewer and the text
starts with "W10: ".

Cheers,

Joseph

*From:*nvda-devel@groups.io <nvda-devel@groups.io> *On Behalf Of *Bill
Dengler
*Sent:* Wednesday, March 25, 2020 10:38 PM
*To:* nvda-devel@groups.io
*Subject:* Re: [nvda-devel] UIA: monitoring a list view for new items

OK, I've installed the latest version of the Windows 10 app essentials
add-on and set my log level to "debug". To test, I opened up cmd (with
UIA console), ran some commands, and looked at the NVDA log, but I
don't see any UIA events. I'd expect to see several textChange events
if the add-on is writing to the NVDA log. Where are UIA events logged?

Thanks,

Bill

*From:*nvda-devel@groups.io <mailto:nvda-devel@groups.io>
<nvda-devel@groups.io <mailto:nvda-devel@groups.io>> *On Behalf Of
*Joseph Lee
*Sent:* 26 March 2020 01:31
*To:* nvda-devel@groups.io <mailto:nvda-devel@groups.io>
*Subject:* Re: [nvda-devel] UIA: monitoring a list view for new items

Hi,

AccEvent is a Windows SDK tool that will report accessibility events
generated by MSAA/UIA servers (apps and controls). I usually resort to
using AccEvent if I need information for new events and/or investigate
certain events further. For the most part, I use Windows 10 App
Essentials add-on debug printout for UIA event tracking.

Cheers,

Joseph

*From:*nvda-devel@groups.io <mailto:nvda-devel@groups.io>
<nvda-devel@groups.io <mailto:nvda-devel@groups.io>> *On Behalf Of
*Bill Dengler
*Sent:* Wednesday, March 25, 2020 10:28 PM
*To:* nvda-devel@groups.io <mailto:nvda-devel@groups.io>
*Subject:* Re: [nvda-devel] UIA: monitoring a list view for new items

What is AccEvent?

Unigram (Telegram) and Dell Mobile Connect (iMessage).

Bill

*From:*nvda-devel@groups.io <mailto:nvda-devel@groups.io>
<nvda-devel@groups.io <mailto:nvda-devel@groups.io>> *On Behalf Of
*Joseph Lee
*Sent:* 26 March 2020 01:27
*To:* nvda-devel@groups.io <mailto:nvda-devel@groups.io>
*Subject:* Re: [nvda-devel] UIA: monitoring a list view for new items

Hi,

What does AccEvent and Windows 10 App Essentials add-on in debug mode
(restarting NVDA with debug logging enabled) tell you about events
fired by the message list/items? Apart from structure change event
(which we don't care about), the way I did for old UWP Skype app
module was to look at events from other UIA elements and announce the
last message accordingly (a variant of this algorithm was implemented
to let NVDA announce text responses from Cortana 2 in Version 2004).

Which apps are you writing app modules for?

Cheers,

Joseph

*From:*nvda-devel@groups.io <mailto:nvda-devel@groups.io>
<nvda-devel@groups.io <mailto:nvda-devel@groups.io>> *On Behalf Of
*Bill Dengler
*Sent:* Wednesday, March 25, 2020 10:17 PM
*To:* nvda-devel@groups.io <mailto:nvda-devel@groups.io>
*Subject:* [nvda-devel] UIA: monitoring a list view for new items

Hello,

I'm working on app modules for two UWP messaging apps. In both cases,
messages are presented in list views that can be uniquely identified
by obj.UIAElement.CachedAutomationID. When new messages arrive, the
list view is updated with these messages. I'd like to have NVDA
automatically read these messages, similar to Skype/Miranda.

It doesn't seem like any NVDA events are executed when new items are
added to the list, and no textChange events are executed when
subscribing to display model notifications for the list with
displayModel.requestTextChangeNotifications(obj, True).

What's the best way to detect new list items? Do I need to constantly
poll the list?

Thanks,

Bill