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

Report
All responses (
Answers (