# How to check if a Script is still running. Execute another once finished

**URL:** <https://blenderartists.org/t/how-to-check-if-a-script-is-still-running-execute-another-once-finished/562464>\
**Category:** Python Support\
**Created:** [January 15, 2013, 5:03am UTC](https://blenderartists.org/t/how-to-check-if-a-script-is-still-running-execute-another-once-finished/562464 "2013-01-15T05:03:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dumisani](https://blenderartists.org/user_avatar/blenderartists.org/dumisani/32/10499_2.png) [@Dumisani](https://blenderartists.org/u/Dumisani)\
**Post date:** [January 15, 2013, 5:03am UTC](https://blenderartists.org/t/how-to-check-if-a-script-is-still-running-execute-another-once-finished/562464/1 "2013-01-15T05:03:38Z")

</div>

while someScriptRunning():wait()

continue()

I am scripting in Blender 2.49 but feel free to post any Blender Version Solution. Thank You

I want to terminate and re-run a Blender python script in order to refresh my GUI widgets.  
At the moment my Script can create a number of textboxes according to the number of selected Poly. But you need to exit it and run it manually after selecting other Polygons. I would like to automate this

---

<div class="post-metadata">

**Author:** ![Dumisani](https://blenderartists.org/user_avatar/blenderartists.org/dumisani/32/10499_2.png) [@Dumisani](https://blenderartists.org/u/Dumisani)\
**Post date:** [January 15, 2013, 5:05am UTC](https://blenderartists.org/t/how-to-check-if-a-script-is-still-running-execute-another-once-finished/562464/2 "2013-01-15T05:05:01Z")

</div>

Or is there a way to clear the GUI in blender at runtime or maybe terminate a script?
