# GUI no respondse when invokeAsynchronous the COM IO fucntion

**URL:** <https://forum.inductiveautomation.com/t/gui-no-respondse-when-invokeasynchronous-the-com-io-fucntion/42342>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 18, 2021, 1:32am UTC](https://forum.inductiveautomation.com/t/gui-no-respondse-when-invokeasynchronous-the-com-io-fucntion/42342 "2021-01-18T01:32:35Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [January 18, 2021, 12:53pm UTC](https://forum.inductiveautomation.com/t/gui-no-respondse-when-invokeasynchronous-the-com-io-fucntion/42342/4 "2021-01-18T12:53:30Z")

</div>

> [@nminchin](#):
>
> Inherited scope variables… I can’t remember the name

"Closures"

You can also use default parameters for an inline-defined function. I recommend just using my later.py script module.

> [@Update GUI via Asynchronous thread](http://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666/3):
>
> 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: # In a script module in your project: import shutil def fileTransfer(label): path = system.file.openFile() newPath = "F:\NewFolder" shutil.copy2(path, newPath) sh…

---

_[View the full topic](https://forum.inductiveautomation.com/t/gui-no-respondse-when-invokeasynchronous-the-com-io-fucntion/42342)._
