# Change a Properties from a Differant Window

**URL:** <https://forum.inductiveautomation.com/t/change-a-properties-from-a-differant-window/8932>\
**Category:** Ignition\
**Created:** [August 20, 2014, 6:10pm UTC](https://forum.inductiveautomation.com/t/change-a-properties-from-a-differant-window/8932 "2014-08-20T18:10:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DarkFox](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@DarkFox](https://forum.inductiveautomation.com/u/DarkFox)\
**Post date:** [August 20, 2014, 6:10pm UTC](https://forum.inductiveautomation.com/t/change-a-properties-from-a-differant-window/8932/1 "2014-08-20T18:10:45Z")

</div>

I am wanting to change a property in one window when a button is pressed in a separate window. I am wanting to do this with the Buttons Script editor. I am not sure how to be able to write to a property this way. What should I do for this kind of script? I don’t want to create more tags as i know i could do it that way. I would like to make it clean and simple.

Kind of what I want to do: event.source.parent.getComponent(‘Cube Status’).texturePath = “Changed”

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [August 20, 2014, 6:34pm UTC](https://forum.inductiveautomation.com/t/change-a-properties-from-a-differant-window/8932/2 "2014-08-20T18:34:27Z")

</div>

Hi DarkFox,

Here’s code that does it. Modify this to get the window you want to get and put this in the actionPerformed script in the button.

```auto
try:
	win = system.gui.getWindow("Main Windows/Main Window 3")
	win.rootContainer.test = 5
except ValueError:
	print "window is not open"
```

The excpetion handling is there in case the window isn’t open - in which case you can’t get it. You could use the system.nav.openWindow to open the window if it isn’t open.

---

<div class="post-metadata">

**Author:** ![DarkFox](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@DarkFox](https://forum.inductiveautomation.com/u/DarkFox)\
**Post date:** [August 20, 2014, 9:01pm UTC](https://forum.inductiveautomation.com/t/change-a-properties-from-a-differant-window/8932/3 "2014-08-20T21:01:50Z")

</div>

I worked with the code that you had and was able to get it to work. The final code looks like this:

system.gui.getWindow(“Navigation”).rootContainer.getComponent(‘First Tier Tabs’).selectedTab = “Main Windows/Alarms”

I didn’t need to worry about the error handler as the only way to close the window is to shut down the project.
