LocateAppWindow
CUTools
Description
Find the main window of any application! LocateAppWindow locates windows by process name or window title and returns the handle, position, and size - no matter where they are hidden on the desktop!
With flexible search options for partial matches and filters by visibility, you can find any window - the foundation for all further window operations!
Why This Tool Stands Out
- Fast Lookup by name
- Position & Size determined
- Partial Match possible
- Handle for further operations
Perfect for:
Developers, automation experts, and power users who need to find and control specific application windows. Ideal for UI automation, test scenarios, and workflow optimization.
Workflow support; time savings depend on the task
Instead of manually searching for hidden or minimized windows, you find them instantly by name - with all details for immediate further processing.
JSON Parameters
- processName OPTIONAL (String)Name of the process (e.g., "notepad.exe", "chrome.exe"). Either processName or windowTitle must be specified.
- windowTitle OPTIONAL (String)Title or part of the window title. Either processName or windowTitle must be specified.
- exactMatch OPTIONAL (Boolean)Whether an exact match is required. Default: false (partial match allowed)
Example Call
{
"tool": "LocateAppWindow",
"params": {
"processName": "notepad.exe"
}
}
Example with window title:
{
"tool": "LocateAppWindow",
"params": {
"windowTitle": "Untitled",
"exactMatch": false
}
}
Example Usage
Typical AI Command
- "Find the Chrome window titled 'Document' and position it on the left monitor."
Return Values
The tool returns an object with the following properties:
- success (Boolean)
True if a window was found - found (Boolean)
Whether a matching window exists - windowHandle (Integer)
Window handle (HWND) of the window found - windowTitle (String)
Actual title of the window found - processName (String)
Name of the associated process - x (Integer)
X position of the window - y (Integer)
Y position of the window - width (Integer)
Width of the window - height (Integer)
Height of the window - error (String, optional)
Error message if the search failed
Related Tools
Download CUTools
Get access to all 17 Computer Use tools for Windows automation.
Download Now