How can I check if a window is already open?

I have a window that opens based on a client event tag change. There are two types of barcode, cases and products that go in those cases. What a case is scanned, a new window is opened, and then the user can scan products that are in the case to verify everything is where it should. This works fine.

But if a window is not opened and a product is scanned, I want to open up a new window with the relevant case if possible. Right now, if a product is scanned after a case, there is no new window, there is just some inter-window logic that is done.

What’s the easiest way to check if a popup window is already open?

You can use either system.gui.getOpenedWindows() for the window objects, or just system.gui.getOpenedWindowNames() for just the names.

Sounds like you’d probably just check if your popup window path is in system.gui.getOpenedWindowNames().


Thanks, I was looking for something along those lines under the system.nav. Seems like what I need.