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 / Loop that contains con...
Power Automate
Unanswered

Loop that contains conditional 'If window with title 'x' is open' is not reevaluating the conditional as expected

(1) ShareShare
ReportReport
Posted on by

Loop that contains conditional 'If window with title 'x' is open' is not reevaluating the conditional as expected. The conditional begins as true and the If logic is executed and that is correct. The IF logic is meant to remedy the window, but once gone, we re-enter the IF logic as if the window is still there - but it is isn't. The window title is very explicit with no wildcards and have validated this window is not open anywhere on the PC (and no other windows with the same Titles are open)

 

LOOP LoopIndex FROM 1 TO MaxAttemptsCount STEP 1
    IF (UIAutomation.IfWindow.IsOpenByTitleClass Title: $'''Information''' Class: $'''''') THEN
      Scripting.RunVBScript VBScriptCode: %Script code to close window% -- close window with title 'Information'
      WAIT 2
    ELSE
      EXIT LOOP
    END
END LOOP

I have the same question (0)

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 267 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 196

#3
Haque Profile Picture

Haque 182

Last 30 days Overall leaderboard