wintool
Automate Windows GUI applications by finding, inspecting, and controlling windows. Perform operations like clicking, typing, capturing screenshots, reading clipboard images, and sending window messages for automation tasks.
Instructions
Windows GUI automation tool for finding, inspecting, and controlling windows. Find windows by title/class/PID, enumerate child controls, capture screenshots (base64 PNG), read clipboard images, read/set text, click, type, send raw messages, show/hide/minimize/maximize, move/resize, close, focus. Windows only. macOS and Linux are not supported. Operations: list, tree, find, inspect, screenshot, clipboard, gettext, settext, click, type, send, show, move, close, focus. clipboard: reads image from system clipboard and saves as PNG temp file. Use after Win+Shift+S or Copy. type: sends keyboard input. Auto-detects console windows (ConsoleWindowClass) and uses WriteConsoleInput. Tip: type + send(msg=WM_KEYDOWN, wparam=VK_RETURN) can inject commands into other terminal/IDE sessions. Works with Electron (VSCode) too.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Operation: list, tree, find, inspect, screenshot, gettext, settext, click, type, send, show, move, close, focus,required | |
| hwnd | No | Window handle in hex (e.g. '0x1A2B3C'). Required for most operations except list/find | |
| title | No | Window title substring to search for (case-insensitive) | |
| class | No | Window class name to search for | |
| pid | No | Filter by process ID | |
| x | No | X coordinate (client-relative) for click | |
| y | No | Y coordinate (client-relative) for click | |
| button | No | Mouse button: left (default), right, middle. For click | |
| text | No | Text for type/settext operations | |
| msg | No | Window message ID (e.g. 16 for WM_CLOSE, 274 for WM_SYSCOMMAND). For send | |
| wparam | No | WPARAM value for send operation | |
| lparam | No | LPARAM value for send operation | |
| post | No | Use PostMessage instead of SendMessage (async). Default: false | |
| show_cmd | No | Show command: show, hide, minimize, maximize, restore. For show | |
| move_x | No | New X position for move | |
| move_y | No | New Y position for move | |
| width | No | New width for move (0 = keep current) | |
| height | No | New height for move (0 = keep current) | |
| max_results | No | Maximum number of results. Default: 100, Max: 1000 | |
| save_path | No | Save image to this path instead of returning base64. For screenshot/clipboard |