Win Focus
Win Focus
Section titled “Win Focus”Type: win-focus · Package: Desktop Activities v1.0.0
Activates a window and brings it to the foreground (in front of the others). Useful when multiple applications are open and you need to make sure the bot is acting on the correct window, or when an action requires the window to be visible and in focus.
How it works
Section titled “How it works”It locates the window by its selector, activates it and brings it to the front, waiting until timeout for it to reach the foreground.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
selector | selector | The window to focus on. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
session | session | Win Attach session. If omitted, the selector must include the window. |
timeout | number | Maximum in ms to wait for the window to reach the front. By default 15000. |
Example
Section titled “Example”Win Focus selector = (ventana "ERP")Win Click selector = (botón "Procesar")Related activities
Section titled “Related activities”- Win Attach — connect to the window.
- Win Click / Win Type — interact once focused.