# system.nav.openWindow, wait for window to close before finishing script?

**URL:** <https://forum.inductiveautomation.com/t/system-nav-openwindow-wait-for-window-to-close-before-finishing-script/57024>\
**Category:** Ignition\
**Created:** [March 9, 2022, 5:52pm UTC](https://forum.inductiveautomation.com/t/system-nav-openwindow-wait-for-window-to-close-before-finishing-script/57024 "2022-03-09T17:52:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 9, 2022, 6:00pm UTC](https://forum.inductiveautomation.com/t/system-nav-openwindow-wait-for-window-to-close-before-finishing-script/57024/2 "2022-03-09T18:00:36Z")

</div>

> [@Jacob\_Sanchez](#):
>
> i am unsure of how to “pause” the script without blocking everything else in the process.

You cannot. Pausing a component event script freezes the whole GUI. There is no equivalent to VB's "doEvents" statement.

What you _ **can** _ do is stick a callable (function object) into a client property of the pop-up and have the popup look for it and run it on close. See this related topic:

> [@Working with python datatypes across multiple Vision windows?](https://forum.inductiveautomation.com/t/working-with-python-datatypes-across-multiple-vision-windows/56414/2):
>
> In vision, you can attach arbitrary objects to windows and components with Swing’s .putClientProperty() method. Many examples here on the forum. In the gateway and for certain cases in Vision clients, you can use system.util.getGlobals() to stash arbitrary objects. However, there are some gotchas: Actual persistence of getGlobals has varied across versions. Badly broken in the middle of v7.9 all the through early v8.1. I created a work-around for those who need it via system.util.persist…

---

_[View the full topic](https://forum.inductiveautomation.com/t/system-nav-openwindow-wait-for-window-to-close-before-finishing-script/57024)._
