- Home
- Skills
- Workflow Automation
- windows-desktop-automation
More screenshots
Works with the AI Agents you already use
Windows Desktop Automation
Automate Windows desktop applications 5-10x faster than pixel-scanning by accessing the native UI Automation tree, with image matching and OCR fallback.
$5
windows-desktop-automation
Example session with this skill installed
I need to automate filling out a form in our legacy ERP application.
- Read your context and instructions
- Compiled the windows-desktop-automation
Launched ERP app via pywinauto. Discovered UI tree with print_control_identifiers():
Edit(auto_id="txtCustomerName") — customer name fieldComboBox(title="Region") — region dropdownButton(title="Save") — save buttonImplemented:
app = Application(backend="uia").connect(title_re=".*ERP.*") dlg = app.window(title_re=".*ERP.*") dlg.child_window(auto_id="txtCustomerName").set_edit_text("Acme Corp") dlg.child_window(title="Region").select("North America") dlg.child_window(title="Save").click()Filled and saved the form in 0.3 seconds (vs. 4 seconds with coordinate-based approach).
Connects securely to your tools. The creator never sees your data.
About this skill
Automate Windows desktop applications 5-10x faster than pixel-scanning by accessing the native UI Automation tree, with image matching and OCR fallback.
The Problem
You need to automate a Windows desktop application that has no API — a legacy ERP system, a custom internal tool, or an installer wizard. PyAutoGUI clicks at coordinates, but the coordinates change when the window resizes or the DPI setting changes. You try to find the "Submit" button by matching a screenshot, but the button looks different on high-DPI displays. You need a way to interact with UI elements reliably, regardless of window position, screen resolution, or display scaling.
What You Get
- 4-layer automation architecture — Layer 1 (pywinauto UIA backend) for fastest native element access, Layer 2 (OpenCV template matching) for elements without accessibility info, Layer 3 (pytesseract OCR) for extracting text from screen regions, Layer 4 (pyautogui) as last resort for sandboxed apps
- Native UI element interaction — finds buttons, text fields, menus, tree views, list views, and datagrids by automation ID, class name, visible text, or control type using the Windows UI Automation tree
- Keyboard and hotkey execution — pywinauto's rich
type_keyssyntax (^a= Ctrl+A,{ENTER},%{F4}= Alt+F4) plus pyautogui hotkey combinations for system-level shortcuts - Image-based fallback — OpenCV template matching with configurable confidence threshold to find UI elements that don't expose accessibility information (games, custom-drawn apps, canvas elements)
- OCR text extraction — pytesseract with preprocessing (grayscale, threshold, scale 2x) to extract text from screen regions with position bounding boxes, enabling text-based element location
- Retry and hybrid patterns —
click_with_retryfor flaky UI,click_element_hybridthat tries UIA first then falls back to image matching, andwait_for_visual_changefor screen region monitoring
Why This Beats Prompting It Yourself
When you ask an agent to "automate this Windows app," it generates PyAutoGUI code with hardcoded pixel coordinates. That code breaks on the first screen resize, DPI change, or different Windows version. This skill's layered approach — UIA first (native, resolution-independent), image matching second (handles custom UIs), OCR third (reads text, not coordinates) — produces automations that survive environmental changes. The print_control_identifiers() debugging command reveals the entire UI tree, so you never have to guess element names.
Example Session
You: I need to automate filling out a form in our legacy ERP application.
Agent: Launched ERP app via pywinauto. Discovered UI tree with
print_control_identifiers():
Edit(auto_id="txtCustomerName") — customer name fieldComboBox(title="Region") — region dropdownButton(title="Save") — save buttonImplemented:
app = Application(backend="uia").connect(title_re=".*ERP.*") dlg = app.window(title_re=".*ERP.*") dlg.child_window(auto_id="txtCustomerName").set_edit_text("Acme Corp") dlg.child_window(title="Region").select("North America") dlg.child_window(title="Save").click()Filled and saved the form in 0.3 seconds (vs. 4 seconds with coordinate-based approach).
Use Cases
- Automating data entry into a legacy Windows application with no API
- Testing a Windows desktop application by driving its GUI with E2E automation
- Extracting text from screen regions in a custom application using OCR
- Automating Windows installer wizards or configuration dialogs
- Monitoring a GUI application for visual changes (e.g., waiting for a processing dialog to complete)
Known Limitations
pywinauto requires Python to run with the same privileges as the target application — automating admin-elevated apps requires running Python as Administrator. UAC dialogs cannot be automated by non-elevated processes. Image matching is resolution-dependent — template images must match the screen resolution where automation runs.
Tags: windows desktop-automation pywinauto ocr image-matching gui testing
Version: 1.0.0
pywinauto requires Python to run with the same privileges as the target application — automating admin-elevated apps requires running Python as Administrator. UAC dialogs cannot be automated by non-elevated processes. Image matching is resolution-dependent — template images must match the screen resolution where automation runs. --- Tags: windows desktop-automation pywinauto ocr `image
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 6 months ago
- Software
Python