OnException/ClearException

Item Description

Use with:

Startup scripts, Terminal Launcher, Web, and Windows

SecureLogin version:

3.0.4

Type:

Flow Control

Usage:

OnException exception name call subroutine
ClearException exception name

Arguments:

exception name



subroutine

The name of the exception that you want to act on. Currently two exceptions are supported:

  • ChangePasswordCancelled

    When a user clicks Cancel in the Change Password dialog box.

  • EnterVariablesCancelled

    When a user clicks Cancel in the automatic variable prompt dialog box.

The name of the subroutine you want to run when the exception condition is found to be true.

Description:

Detects when certain conditions are met. Currently, this is when the Cancel button is clicked in either of two dialog boxes. When the condition is met, a subroutine is run.

Use the ClearException command to reset the exceptions value.

Example:

Dialog 
 Title "Login"
EndDialog
OnException EnterVariablesCancelled Call VariablesCancelled
DisplayVariables "Please ensure your username and password are correct"
ClearException EnterVariablesCancelled
Type $Username #1
Type $Password #2
Click #1
Sub VariablesCancelled 
 Messagebox "You cannot cancel the variable verification dialog box. Please make any necessary changes, and click OK"
OnException EnterVariablesCancelled Call VariablesCancelled
DisplayVariables "Please ensure your username and password are correct"
ClearException EnterVariablesCancelled
EndSub