Jump to content

Reading Windows 10 Notifications


Recommended Posts


I'm trying to receive a list of notifications found in native action/notification center of windows 10. I'm aware that system service apps can't do that. I've stumbled upon UI Automation by LarsJ to use UserNotificationListener (https://docs.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/notification-listener). I could not change the code to use UserNotificationListener method and I'm completely lost. Is there any other way to do this? If not, how could I use UIAutomation with UserNotificationListener? I would really appreciate any help on this issue. 

Thank you.

Link to comment
Share on other sites

I've tried using UIASpy to get handles to UI objects from action center. However, all it returned were for the actual window created and not controls or notifications. Also, the only available methods were the following: (taken from UIASpy)


So I don't think UserNotificationListener is available, for this control that is. Another thing is that action center was not detected by UIASpy when it was minimzed. So action center should be clicked on and the window should be there for these methods to be used (although they don't seem to work for UserNotificationListener). 

Does anyone have any pointers on this issue? 

Link to comment
Share on other sites

Note that this UserNotificationListener (class) that you are referring to has nothing to do with UIA (User Interface Automation) code. It has something to do with UI (User Interface) code used to create and manage user interfaces. This means that the UserNotificationListener (class) can in no way be used in relation to UIA code.

Regarding UIASpy and Windows 10 Action Center, have you asked UIASpy to generate information for the entire control structure in the window as described in this post?

But even if you can get more UIA information about the Action Center, and I'm pretty sure you can, it's not necessarily entirely trivial to access the information in the individual notifications.

A easier approach might be to take a closer look at the C# code associated with the example for the UserNotificationListener class. It's possible to execute C# code in an AutoIt script with the techniques demonstrated in this example.

Whatever approach you take, I'll not be contributing any code right now. Nevertheless, it's an interesting topic and I've made a note on it so that I can take a closer look when the opportunity arises.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...