Close primary screen using an event script

Hi,
I would like to have a button that closes the Vision SCADA but when I call the function system.gui.closeDesktop(“primary”) an error accours that says that I cannot close the primary screen.
Is there a way to circumvent this?
Thanks

Try system.util.exit().

2 Likes

Thank you