Sub / Endsub

Item Description

Use with:

Startup scripts, Terminal Launcher, Web, and Windows

SecureLogin version:

2.5 and later

Type:

Flow Control

Usage:

Sub name
EndSub

Arguments:

name

Any name entered to identify the subroutine.

Description:

To denote a subroutine, use the Sub/EndSub command around a block of lines within a script. You can call a subroutine by using the Call command.

Example:

Dialog  
 Title "Login"
 Ctrl #1
EndDialog
If -Text "Login"
 Call Login
EndIf
If -Text "Wrong Password" 
 Call WrongPassword
EndIf
Sub Login 
 Type $Username #1
 Type $Password #2 
 Click #1
EndSub
Sub WrongPassword 
 DisplayVariables "Enter correct password" $Password
EndSub