SetWindowState
CUTools
Description
Change the state of any window! SetWindowState lets you minimize, maximize, restore, or activate windows - your desktop organizes itself according to your rules!
With support for all common window states and options such as bringing a window to the foreground or changing its transparency, you control your work environment programmatically - by voice command or automation!
Why This Tool Stands Out
- Control Windows by command
- Min/Max/Restore supported
- Visibility change
- Instant Execution
Perfect for:
Power users, developers, and automation experts who want to control their desktop environment programmatically. Ideal for workflow automation, multitasking optimization, and UI testing.
Workflow support; time savings depend on the task
Instead of manually finding, moving, and arranging windows, you organize your desktop with a single API call - perfect for recurring work layouts.
JSON Parameters
- windowHandle REQUIRED (Integer)The window handle (HWND) of the window to control.
- state REQUIRED (String)The desired window state: "minimize", "maximize", "restore", "show", "hide", "activate"
- bringToFront OPTIONAL (Boolean)Bring the window to the foreground. Default: false
Example Call
{
"tool": "SetWindowState",
"params": {
"windowHandle": 123456,
"state": "maximize",
"bringToFront": true
}
}
Example Usage
Typical AI Command
- "Minimize all windows except the browser, then maximize Chrome."
Return Values
The tool returns an object with the following properties:
- success (Boolean)
True if the state change was successful - previousState (String)
Previous state of the window - newState (String)
New state of the window - error (String, optional)
Error message if the change failed
Related Tools
Download CUTools
Get access to all 17 Computer Use tools for Windows automation.
Download Now