System.gui.confirm() - Auto close

We’re having reports that on one of our systems we’re having an issue where a system.gui.confirm() popup is getting behind the Ignition display and silently locking out the screen. In order to be able to do anything we need to Alt-Tab to the confirm popup and close it.

Is there a way to automatically close/cancel system.gui.confirm() through scripting (for example, if they don’t push yes within five minutes it automatically closes)?

This is Ignition 8.0.16 (Vision).

Thank you.

You can’t use scripting because those popups stop the GUI thread. So almost all other scripts won’t run, either.

Just don’t use system.gui.confirm(). At all. (Nor any of the system.gui.*Box functions.) Make a real popup window for such user interaction. Use window z-order to keep them on top if necessary. Regular popup windows allow scripts to keep running, and can’t get behind the application window.

Good to know. This seems to be another of the “even though Ignition makes it an option, you shouldn’t ever do it” things. It would be nice if the documentation had these disclaimers included.

Appreciate the response, thanks!

I would like to see them deprecated, so they drop out of the docs entirely.

Take a look at this

1 Like

Great reference, thanks.