Structuring and Executing Scripts

A script is a simple piece of text that is stored by the SecureLogin script broker. Scripts store the login name, password, and any other information in fields required for authentication. Scripts are stored in the local database and in eDirectory.

Each script has a name, called the application name, which uniquely identifies it within a particular single sign-on database. In addition, each script has a type, known as the application type (prebuilt, Windows, or Web). The application type specifies the type of application the script refers to and which of the SecureLogin components executes it.

SecureLogin scripts execute sequentially from the first line. There are no flow control mechanisms as such. There are, however, instances where a component might choose not to execute certain statements, as in the Dialog / EndDialog statement.

Each line in the script consists of one or more arguments. Arguments are separated by white space (spaces and tabs), unless they are enclosed in quotation marks. For example, the following line contains three arguments: A simple "command to get started".

  1. A
  2. simple
  3. "command to get started"

After a script has been broken into arguments, the quotation marks are removed. If you need to specify an actual quotation mark in a script, precede it with a backslash (for example, \").

The first argument on a line is the command. It specifies the action the line takes. The rest of the arguments on the line, if any, are passed to that command. Different commands take varying numbers of arguments. For a list of commands and their arguments, see SecureLogin Commands in Script Commands.

A line that begins with a # character is treated as a comment and is ignored in the script language. The following example illustrates the use of the # character:

Window "login"
Delay 30
#SecureLogin ignores this line and the next three lines
#while executing the script.
#The Delay is used to wait for the window to be created #correctly.
Type "$Username"

Scripts are interpreted as SecureLogin components to perform the sign-in process. This functionality ensures that any variables that are substituted are current.