# Update GUI via Asynchronous thread

**URL:** <https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666>\
**Category:** Ignition\
**Created:** [February 5, 2015, 9:41pm UTC](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666 "2015-02-05T21:41:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [February 6, 2015, 3:39pm UTC](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666/3 "2015-02-06T15:39:53Z")

</div>

Since this sort of thing pops up often, I created a set of wrappers that simplify this stuff, and allows you to directly use functions in your script modules. The wrappers take care of stuffing the arguments you supply into a temporary fuction’s default argument.  
For your case, try `assignLater()`. Nick’s example becomes:

```auto
# In a script module in your project:
import shutil
def fileTransfer(label):
   path = system.file.openFile()
   newPath = "F:\NewFolder"
   shutil.copy2(path, newPath)
   shared.assignLater(label, "text", "Step one done")

```

```auto
# In your button event
label = event.source.parent.getComponent("Label")
shared.later.callAsync(project.module.fileTransfer, label)

```

[later.py](https://www.automation-pros.com/ignition/later.py) (12 KB)  
{ Updated link to point to a permanent location @ [automation-pros.com](http://automation-pros.com) }

---

_[View the full topic](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666)._
