Open New Instance if not Already Opened

I have a popup window that I reuse for multiple of the same device. In order to allow multiple instances of the popup to be open at once, I use the additional instance (system.gui.openWindowInstance) option on a mouseClicked navigation action.

However, if a user clicks the same device twice, there are now 2 identical popups. How can this be avoided?

You need a script of your own that iterates through the opened windows checking if there’s an instance with matching parameters (in the root container) already open. Then either focus that window instead of opening another, or close that window when your open the new one.

2 Likes