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 / Anyone know how to get...
Power Automate
Unanswered

Anyone know how to get a list of open windows for a specific application?

(0) ShareShare
ReportReport
Posted on by 466

Greetings, all! I want to extract a list of all of the open windows for a specific application, but I can't seem to figure out the most efficient way to do that. Anyone have thoughts? I don't want to have to program a mouse hover and then extract if I can help it.

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    MichaelAnnis_0-1658934104342.png

     

    This gets each window looping through them by using Alt + Tab.  This specific setup is to pull windows name, but if you wanted to, you could pull %AutomationWindow% instead which would pull the process ID and you use the %AutomationWindow% to use Get Window Details for anything besides title and process id.  Once you have the %AllWindows% list, you could do another loop on the list for "If doesn't contain Excel (for example), delete from list.

     

    Good luck!

     

     

    UIAutomation.GetWindow.GetForegroundWindow WindowTitle=> WindowTitle WindowInstance=> AutomationWindow
    Variables.CreateNewList List=> AllWindows
    Variables.AddItemToList Item: WindowTitle List: AllWindows
    LOOP LoopIndex FROM 1 TO 99 STEP 1
    MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $'''{Alt}({Tab:%LoopIndex%})''' DelayBetweenKeystrokes: 100 SendTextAsHardwareKeys: False
    WAIT 1
    UIAutomation.GetWindow.GetForegroundWindow WindowTitle=> WindowTitle WindowInstance=> AutomationWindow
    IF WindowTitle = AllWindows[LoopIndex - 1] THEN
    EXIT LOOP
    ELSE
    Variables.AddItemToList Item: WindowTitle List: AllWindows
    END
    END

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard