Top  | Previous | Next

Shutdown Intercept Script

This script type is only available in the Client scope. This is a special script that will be called when the user tries to exit or close the client. This script is run with a special event variable in its namespace. When the script terminates, if event.cancel is 1, then the shutdown will be aborted, and the client will remain open. Otherwise, the normal shutdown script will be called, and the client will close.

Example

if "SuperUser" not in system.security.getRoles():

   system.gui.warningBox("Exit not allowed for non-admin user.")

   event.cancel=1