Read from Client Message Handler

Hi,
I have a text box in a client main window and a button in another main window.
I am trying to pass a message from one window to another using message handlers.
I understood how to pass the message to the message handler, but not sure how can i read it from a different window.

Client message handlers are window neutral. They exist throughout your whole client. If your client message handler receives a message, the script will run no matter what window is open. If you only want the script to run if a particular window is open you will want to use system.gui.getWindow - Ignition User Manual 8.0 - Ignition Documentation to see if the window you want is open and if so to run the rest of your script. You will probably need to do this using a try/except for situations where your client message handler is hit but the main window isn’t open - doing system.gui.getWindow() throws an error if you try it on a window that is not currently open.

To add to this, system.gui.getOpenedWindowNames or system.gui.getOpenedWindows could also be useful.

1 Like

Thanks a lot, it worked!