Skip to main content

Hello,

I’m trying to properly close all Edge windows if they exist (not task kill). But when the last window gets closed, the next loop iteration takes the whole minute to check if another Edge window exists before exit from it. How can I reduce that wait time?

 

Thank you

 

 

 

Hi ​@dean.hubak,

 

You can try two methods here to tackle this. 

 

  • Use an inner IF condition within the while-loop to check if the window exists; if found, add a Window: Close, else you can add a Loop Break.

This forces AA to check every 1 second instead of waiting for the internal loop cycle.  The Break ensures immediate exit when no window is found.

 

 

  • Instead of Loop → While, use the Window: Find Windows (Criteria: Process name = msedge.exe). Then loop through the Windows and add the Window: Close within it.

This avoids the while-loop overhead entirely.