web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How can I select the (...
Power Automate
Unanswered

How can I select the (gray) dialog box?

(0) ShareShare
ReportReport
Posted on by 424

I use the loop to select files in multiple Excel, but I can't select its dialog to exit (like step 32 as [focus window]).
The old method does not use a loop. After selecting a file, use the UI element to click the dialog box to exit (like step 33 as [Click windows]).
How can I use actions to select the front (gray) dialog box (without using UI elements)? Thanks

螢幕擷取畫面 2023-07-01 223115.png

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I don't really understand the issue here. Why do you want to not use UI actions? What exactly do you want to do? Can you share a screenshot of the specific dialog that you are trying to access?

  • alee001 Profile Picture
    424 on at

    Since the UI element needs to specify the dialog to click, it cannot use a different dialog in the loop.

     

    For example, 20 independent Excel files have 20 Userforms/Dialog Boxes, that is, 40 windows will be generated. If you use UI elements, you must click on 40 windows to operate. There is no need to use loops to save time.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I would assume the dialog boxes will have the same selector, apart from the name of the parent Excel window. You can build a selector that is universal for all of them. I would then suggest using the Get window action to pick one of those dialogs. This will create a window instance variable that you can use in further UI actions instead of basic the window on the selector.

  • alee001 Profile Picture
    424 on at

    I have tried using [Get Window] and [Focus Window] to select Excel files (they are not opened from PAD), but none of them can click the current dialog box (except using UI elements), and there are no other actions and parameters to activate the dialog box.

     

    If you use the UI element to click the dialog, you cannot repeat the operation in the loop.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You could do it in a loop if you made the selectors universal for all windows. Alternatively, if the dialog is always on top and visible, you could use Move mouse to image and capture the dialog or a button on it as an image. Move mouse to image allows sending a mouse click after moving, so you can use it to click a button.

  • alee001 Profile Picture
    424 on at

    Isn't the selector established on the UI element? Is there an example of how to use it in the loop?

     

    Dialog boxes can appear in different positions in multiple Excel files, and there is no way to make them active except for clicking one by one with UI elements

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    A selector can be modified. You can select and deselect various parameters of a selector to make the dialog box for multiple files have exactly the same selector, making the UI actions work for all of them.

  • alee001 Profile Picture
    424 on at

    Thank you for your reply and explanation,

    Although all parameters of the UI elements of the dialog box [Test state] are the same, they cannot be used in different files, and a dialog box with corresponding UI elements must be created for each file to operate. (as pictured)

    螢幕擷取畫面 2023-07-02 153415.png

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    This is because of their parent Window element having the name of the file in the selector. Please modify the parent window element and they will work for all files.

  • alee001 Profile Picture
    424 on at

    I should use PAD to open all Excel files to select their current dialog windows, otherwise I can only use UI elements to click one by one to operate.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard