Windows
CUP on Windows using UI Automation (UIA) via COM.
Overview
On Windows, CUP uses the UI Automation (UIA) framework via COM interop. This is the primary accessibility API on Windows 10 and later.
Requirements
- Windows 10 or later
- Python:
comtypes(installed automatically) - TypeScript: PowerShell + C# interop (bundled)
No additional setup is needed — CUP auto-detects Windows and loads the UIA adapter.
How it works
The Windows adapter uses comtypes (Python) or PowerShell with inline C# (TypeScript) to connect to the UIA COM interface. It walks the automation tree, reading control types, names, patterns, and bounding rectangles.
Role mapping
Windows UIA control types map to CUP roles:
| UIA ControlType | CUP Role |
|---|---|
Button | button |
CheckBox | checkbox |
ComboBox | combobox |
Edit | textbox |
Hyperlink | link |
Image | img |
List | list |
ListItem | listitem |
Menu | menu |
MenuItem | menuitem |
ProgressBar | progressbar |
RadioButton | radio |
Slider | slider |
Tab | tablist |
TabItem | tab |
Table | table |
Text | text |
Window | window |
Action mapping
CUP actions map to UIA control patterns:
| CUP Action | UIA Pattern |
|---|---|
click | InvokePattern |
toggle | TogglePattern |
expand | ExpandCollapsePattern |
select | SelectionItemPattern |
setvalue | ValuePattern |
scroll | ScrollPattern |
Platform-specific properties
For the full platform-specific property schema, see Node Structure.
Use detail="full" to include platform-specific properties. In compact mode, only the canonical CUP properties are included.