# Designer hanging with script, but client runs fine

**URL:** <https://forum.inductiveautomation.com/t/designer-hanging-with-script-but-client-runs-fine/58006>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [April 4, 2022, 3:40pm UTC](https://forum.inductiveautomation.com/t/designer-hanging-with-script-but-client-runs-fine/58006 "2022-04-04T15:40:54Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [April 4, 2022, 4:28pm UTC](https://forum.inductiveautomation.com/t/designer-hanging-with-script-but-client-runs-fine/58006/8 "2022-04-04T16:28:46Z")

</div>

You are also using `system.tag.browse()` in the foreground. Like any other script function that calls out to the gateway, it should be called in a background script, and UI interaction handled with `.invokeLater()`. See this topic:

> [@Update GUI via Asynchronous thread](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666):
>
> I’ve got a script I am experimenting with that can take a lot of time to execute, so I now use the system.util.invokeAsynchronous to run the script in a separate thread to keep the GUI from locking up. I am using the asynchronous thread to copy files from one place to another, and I would like to show the progress of the file copy with a progress bar. How would I go about this? I am importing a few python libraries to do this. import shutil def fileTransfer(): path = system.file.openFile() …

I make an exception for button actionPerformed scripts (short ones), as an operator can expect some processing delay upon their command.

---

_[View the full topic](https://forum.inductiveautomation.com/t/designer-hanging-with-script-but-client-runs-fine/58006)._
