# Component Event Script- How to change property of source or another component

**URL:** <https://forum.inductiveautomation.com/t/component-event-script-how-to-change-property-of-source-or-another-component/34964>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [May 22, 2020, 2:00am UTC](https://forum.inductiveautomation.com/t/component-event-script-how-to-change-property-of-source-or-another-component/34964 "2020-05-22T02:00:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [May 22, 2020, 5:35am UTC](https://forum.inductiveautomation.com/t/component-event-script-how-to-change-property-of-source-or-another-component/34964/2 "2020-05-22T05:35:16Z")

</div>

> [@Update progress bar from within a script](http://forum.inductiveautomation.com/t/update-progress-bar-from-within-a-script/21995/3):
>
> Event scripts run in the foreground. Painting the UI runs in the foreground, so it can’t happen until your script finishes. You need to wrap up your long-running operation into a function, and then run that with invokeAsynchronous. That function can send updates back to the foreground with invokeLater. You must not ever assign to component properties or call component methods from an asynchronous (background) function. You can really scramble Swing and/or deadlock it. Take a look at this t…

---

_[View the full topic](https://forum.inductiveautomation.com/t/component-event-script-how-to-change-property-of-source-or-another-component/34964)._
