# Accessing Tags through button script

**URL:** <https://forum.inductiveautomation.com/t/accessing-tags-through-button-script/43927>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [March 1, 2021, 6:06am UTC](https://forum.inductiveautomation.com/t/accessing-tags-through-button-script/43927 "2021-03-01T06:06:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 1, 2021, 1:22pm UTC](https://forum.inductiveautomation.com/t/accessing-tags-through-button-script/43927/3 "2021-03-01T13:22:54Z")

</div>

The gui won't update until after the script is finished. This is because the foreground thread of the script is the gui thread.

If this is a necessary thing to do, consider using @pturmel's later.py scripts.

> [@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/accessing-tags-through-button-script/43927)._
