Repository navigation
winuse 0.2.6
winuse 0.2.6 answers the third round of feedback from driving Java Swing apps: every action tool now says what it did and whether the target confirmed it, Java elements that are scrolled out of view or beyond the window edge are recognised as such, a ref click checks where it would land before clicking, and window_close separates the request from the effect.
Changes
invokereports how it acted.method(action,mouse,selection), the accessibilityactionname when one ran, andoutcome:donewhen the target confirmed it,unknownwhen the request was delivered but never answered. On Swing that is what an action that opened a modal dialog looks like (it returns only when the dialog closes), so the result then carriesnote,foregroundandnew_windowsinstead of a misleadingAction 'click' failed.method: "action"/"mouse"force one path.- Swing push buttons are clicked with the mouse by default. A button's
clickaction runs on the JVM's event thread and answers only when it returns, so a button that opens a modal dialog used to hold the Java Access Bridge for the whole life of the dialog, which then could only be driven blind.invokenow brings the window to the front, checks that the point belongs to the app and clicks the visible button; menu items, check boxes, tabs and anything not on screen keep the accessibility action, andmethod: "action"restores it for buttons. Thetimeoutdiagnosis carriesblocked_by_action_atand says how to proceed when an action did block the bridge. set_textreports the path taken.methodisvalue_pattern(UIA) oraccessible_text(Java) when the accessibility API took the text and the field saw no key events,keyboardwhen the field was focused and the text typed (key listeners such as upper-casing run),fillfor the DOM.method: "keyboard"forces typing,method: "api"fails instead of falling back. The text itself is never in the result.window_closeseparates the request from the effect.close_requested,closed,window_exists_after_request,process_alive(when the window is gone),new_windows(windows the same process opened after the request, with refs: the exit confirmation or save prompt),foregroundand ahintsaying how to answer the prompt and wait for the window.- Explicit completeness flags and server identity. Every
get_ui_treeresult carriesbackend(java_access_bridgeoruia) andserver_version, and a Java tree always statesnode_limit_reached,depth_limit_reachedandunreadable_nodes(false/0when the walk was complete), so a complete tree from this version is distinguishable from an older server that did not report them. - Clipped Java elements. Swing reports
showingfor everything in a displayed hierarchy, including what a scroll pane has scrolled out of view or what lies beyond the window's edge after a resize. Java elements are now clipped to their window andviewportancestors:rectis the part on screen, an element with no on-screen part isoffscreen: true(listed only withinclude_offscreen, with its full rect so you know where to scroll), andclick/invokeresolve the same visibility at call time and refuse such an element with the reason. - Click hit check.
clickon a ref checks, before clicking, that the resolved point lies on a window of the process that owns the ref (popups and dialogs of the same process count). A point on another process's window (the taskbar or Start button after the screen shrank, a window covering the target) or on no window fails with the reason and nothing is clicked; the result names the window under the point aslands_on. Coordinates are clicked as given.
Scenarios recorded with 0.2.5 replay unchanged. Behaviour changes for existing clients: invoke on a visible Swing push button clicks it instead of running its action (pass method: "action" for the old behaviour); Java elements scrolled out of view are no longer listed by default (pass include_offscreen: true); a ref click that would land outside the app's windows now fails instead of clicking.
Install
- Install the .NET 10 runtime (or SDK).
- Unzip
winuse-0.2.6-win-x64.zipinto a folder. - Register with Claude Code:
claude mcp add winuse -- <folder>\winuse.exe --mcp - Set
JEV_API_KEY, orCLOUDFLARE_ACCOUNT_IDandCLOUDFLARE_API_TOKEN, as user environment variables, then runwinuse doctor.
Upgrading: unzip over the previous folder; no settings change.
Known issues
- The modal-dialog outcome and the clipping are verified against a fake bridge and the Swing test fixture, not yet on the live app that reported them.
- Clipping follows
viewportancestors and the window only; a container that clips its children some other way is not detected.
Full changelog: CHANGELOG.md