Change a Properties from a Differant Window

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”

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.

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.

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.