If window Action(Power Automate Desktop)
This action is a companion to the "If" action and branches processing based on the status of the target window.
Window statuses include "open/closed" and "focused/not focused.
How to use
Drag "If window" from "UI automation" under "Actions".
Set parameters.
After setting the parameters, place an action between "If window" and "End" that will be executed if the condition is met (becomes True).
Parameter
Get window
Select how you want to specify the window.
- By window UI element
- By window instance/handle
- Per title and/or class
By window UI element
Directly specifies the UI element of the window.
The following pops up when you click on the input field.
If you have already registered a UI element, select the object,If not registered, click the "Add UI element" button.
Hover the mouse over the menu item you wish to select when the next window appears.
When you hover the mouse over it, it will be surrounded by a red frame.
Then hold down the Ctrl key and click.
The input field should appear as shown in the following figure (the text will vary depending on the UI element you have selected).
By window instance/handle
Specifies the window instance created by the "Get window" action.
Per title and/or class
Specify the title and class.
It can be found in the selector of the UI element, but due to its difficulty, other options are recommended whenever possible.
Check if the window
Select which condition to treat as True.
- Is open
- Isn't open
- Is focused
- Isn't focused
Notes on "Is focused"
When the flow is executed, Power Automate Desktop has the focus. Therefore, it targets the window that has been focused by the "Focus window" action or other actions.
Focus when no window is open
When a window is not open, it is treated as "Isn't focused". That is, False for "Is focused" and True for "Isn't focused".
Else
By placing "Else" under "Condition," it is possible to set the action to be taken in the case of false.
If "Else" is used, the condition should be "Is open" or "Is focused". If you use "Else" with "Isn't open" or "Isn't focused","Else" becomes a double negative, which makes the flow difficult to understand.
For those who want to learn Power Automate Desktop effectively
The information on this site is now available in an easy-to-read e-book format.
Or Kindle Unlimited (unlimited reading).
You willl discover how to about basic operations.
By the end of this book, you will be equipped with the knowledge you need to use Power Automate Desktop to streamline your workflow.
Discussion
New Comments
No comments yet. Be the first one!