"system.gui.openDesktop" Pass Parameter

Hi, I using “system.gui.openDesktop” to use multi monitors, I use “handle” property to give it a name, I wondering if is possible to pass a parameter to this new desktop.

system.gui.openDesktop(screen=1, handle="Monitor2", windows=["Pantalla1"])

It’s not possible to pass parameters directly in the openDesktop call, but since you already have the handle you can pretty easily grab the open window on the client and pass parameters in the next line of your script:

docs.inductiveautomation.com/di … .getWindow

system.gui.openDesktop(screen=1, handle="Monitor2", windows=["Pantalla1"]) system.gui.desktop("Monitor2").getWindow("Pantalla1").parameter = someValue

2 Likes

Thanks PGriffith,
In my case I have a property on the root container so I did the next:

system.gui.openDesktop(screen=1, handle="Monitor2", windows=["Pantalla1"])
system.gui.desktop("Monitor2").getWindow("Pantalla1").rootContainer.valor = someValue")

Thanks for the help.

1 Like