Category : ui-automation

I want to edit dialog control properties so the UI is fully accessible for screen readers. I have tried the following code sample (from https://docs.microsoft.com/en-us/accessibility-tools-docs/items/Win32/Control_Name) // At the top of the C++ file. #include <initguid.h> #include "objbase.h" #include "uiautomation.h" IAccPropServices* _pAccPropServices = NULL; // Run when the UI is created. void SetControlAccessibleName(HWND hDlg) { HRESULT ..

Read more

I’m trying to make logging of cursor hovered menu items in notepad using Automation framework. But when i i hover the cursor on item i get an exception: AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) => { Debug.WriteLine(eventArgs.Exception.ToString()); }; Automation.AddAutomationEventHandler(WindowPattern.WindowOpenedEvent, AutomationElement.FromHandle(Process.GetProcessesByName("notepad").First().MainWindowHandle), TreeScope.Element, OnNotepadControlAction); } I also tried to listen for other events (like AutomationElement events, ItemSelectedPattern, InvokePattern, etc.), ..

Read more