How to know if a particular window is open

What can I use to condition a client event script to run only if a particular window is open?

Use system.gui.getWindow() in a try … except block, like so:try: w = system.gui.getWindow('windowname') catch ValueError: w = None if w: do somethingAs a happy side effect, you have a reference to the window in hand, allowing you to easily get references to properties and components you might need in the script.

Thanks. Just needed to substitute except for catch