If / Else / EndIf

Item Description

Use with:

Startup scripts, Terminal Launcher, Web, and Windows

SecureLogin version:

All

Type:

Flow Control

Usage 1:

If value1 Gt/Lt/Eq value2
Else
Endif

Usage 2:

If -text text
Else
EndIf

Usage 3:

If -exists variable
Else
EndIf

Usage 4:

If text to find -in text_to_search_through
Else
EndIf

Arguments:

Gt/Lt/Eq/-in


-text

-exists

Operators. They compare the value on the left side of the operator to the value on the right side of the operator.

  • If value1 eq value2

    Assesses whether two values are equal.

  • If value1 gt value2

    Assesses whether one value is greater than another value.

  • If value1 lt value2

    Assesses whether one value is less than another value.

  • If text_to_find -in text_to_search_through

    Searches for text from within specified text.

If text text. A shortcut to evaluate text within windows.

If -exists variable. Assesses whether the text specified in the variable is present.

Description:

Establishes a block to be executed if the operator is found to be true.

The Else command works inside an If block. This command is executed if the operator in the If block is false.

The EndIf command terminates the If block.

Syntax examples:

If ?Value1 gt ?Value2
If -Text "Login"
If -Exists ?RunBefore
If Login -in ?Text

Example:

If -text "Incorrect Password"  
 MessageBox "You have entered the incorrect
 password" 
 GotoURL "http://www.novell.com"
Else 
 MessageBox "You have been successfully logged in"
EndIf