# Set Window State

Sets a new window state: hidden, minimized, maximized, normal state.

<table data-header-hidden><thead><tr><th width="301.23333740234375" valign="top"></th><th width="320.21661376953125" valign="top"></th></tr></thead><tbody><tr><td valign="top">Selector</td><td valign="top">[Selector] Identifier of the user interface element. The application window will be determined by the specified selector.</td></tr><tr><td valign="top">Process</td><td valign="top">[Text/Number] Process ID or the value of the ProcessID variable.</td></tr><tr><td valign="top">Process Name</td><td valign="top">[Text] Name of the Process with wildcard support.</td></tr><tr><td valign="top">Window Name</td><td valign="top">[Text] Name of the window with wildcard support.</td></tr><tr><td valign="top">All Windows</td><td valign="top"><p>When selected, the new state will be applied to all windows in the system.</p><p>The three parameters ("Process", "Process Name", and "Window Name") are ignored in this case.</p></td></tr><tr><td valign="top">State</td><td valign="top"><p>New window state.</p><p>Can take the following values:</p><ul><li>Hide - hide the window,</li><li>Normal - set to normal state,</li><li>Minimized - minimize the window,</li><li>Maximized - maximize the window to full screen.</li></ul></td></tr><tr><td valign="top">Old State</td><td valign="top"><p>[Number] Old window state.</p><p>Can take the following values:</p><ul><li>0 - window is hidden,</li><li>1 - window is in normal state,</li><li>2 - window is minimized,</li><li>3 - window is maximized.</li></ul></td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - outputs main information;</li><li>"Detailed" - outputs detailed information.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/spravochnik-blokov/processy-sluzhby-okna/zadat-sostoyanie-okna-setwindowstate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
