This section contains information on the following commands:
Use With |
Startup, Terminal Launcher, Web, or Windows |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Usage |
AAVerify [-Method <Defined method to use>] [-User <Username>] [-Tree <Tree name>] [?Result] |
Arguments |
-Method The name of the advanced authentication method you want to use. If a method is not specified AAVerify uses the method that was chosen during initial authentication to the directory. NOTE:You can specify multiple methods. -User The name of the user you want to use for the AAVerify command. If a method is, AAVerify reauthenticates the currently logged-in user. -Tree The name of the tree the user is in. You must use this with the -User argument. [?Result] A variable name (preferably a temporary variable) that receives the result of AAVerify. Set this variable to true for success or false for failure. ?AAVerifyReturnCode A variable that is set with the error code that is generated from the AAVerify reauthentication process (if any). |
Description |
Use AAVerify with SecureLogin Advanced Authentication or Novell NMAS to verify the user. It is typically used before the application username and password are retrieved and entered into the login box. This provides application reauthentication using a strong login method. For example, a user might be forced to enter his or her smart card and PIN before the application login by using single sign-on, even though the application natively knows nothing about smart cards and PINs. If the verification succeeds, the [?Result] is set to true; otherwise, it is set to false. These additions are for Novell SecureLogin and NMAS. NMAS Specific If AAVerify is called with no arguments, then the currently logged-in user is reauthenticated by using the login method that he or she used for the current login. AA Specific When AAVerify is called in an AA environment, the method parameter must be present. The method must be one of the following:
You can specify more than one -method argument. In this case the user is allowed to reauthenticate with any of the specified methods. For example, you could use the command to request authentication by using a fingerprint device or a smart card. NOTE:When the AAVerify command is added to an application definition, it only increases the security of the target application if it is not possible to alter the application definition. If the application definition could be modified or overridden, then the AAVerify command could be removed and there would be no additional security. For this reason it is imperative that application definition access be restricted through directory ACLs and SecureLogin’s preferences, so that only a small, trusted group of administrators can modify, add and override application definitions. |
Syntax examples |
AAVerify AAVerify -Method "Enhanced Password" ?Result AAVerify -Method "Enhanced Password"-User "BSmith" - Tree "Production" ?Result |
Example 1 |
Windows Application Definition This example detects the login dialog box, but before SecureLogin enters the user's credentials, it prompts the user to provide the Advanced Authentication credentials (smart card, PIN, biometric, and token) # Log on Dialog Box Dialog Ctrl #32770 Title “Log on” EndDialog AAVerify –Method “Enhanced Password” ?Result If ?Result Eq “True” Type “$Username” #1001 Type “$Password” #1002 Click #1 Else MessageBox “Authentication failed! Please verify your smart card is inserted and your PIN is correct. IT x453” EndIf |
Example 2 |
Windows Application Definition The following example shows the usage of the OnExceptions command as well as the ?AAVerifyReturnedCode. Refer to Section 5.2.53, OnException/ClearException for further details and examples of OnException usage. #============================= # Login - Simple #============================= Dialog Title "Login - Simple" Class "#32770" Ctrl #1001 Ctrl #1002 Ctrl #1 "&Login" Ctrl #2 "Cancel" Ctrl #1027 "Username:" Ctrl #1028 "Password:" Ctrl #1009 EndDialog OnException AAVerifyCancelled Call CancelSimpleLoginDialogCancelled OnException AAVerifyFailed Call CancelSimpleLoginDialogFailed AAVerify -method "smartcard" Type $Username #1001 Type $Password #1002 Click #1 # # Cancel the Simple Login Window - AAVerify cancelled # Sub CancelSimpleLoginDialogCancelled Click #2 EndScript EndSub # # Cancel the Simple Login Window - AAVerify failed # Sub CancelSimpleLoginDialogFailed Click #2 MessageBox "Your re-authentication failed. Error " ?AAVerifyReturnCode ". Login cancelled" EndScript EndSubg |
Use With |
Advanced Web Application Definition |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Specifier |
Usage |
Attribute <Attribute Name> <Attribute Name> |
Arguments |
< Attribute Name> Name of the HTML Attribute to discover. < Attribute Value> The value the above HTML Attribute must contain for the condition to be true. |
Description |
Use the Attribute specifier in conjunction with the Tag/EndTag command to specify which HTML attributes and attribute values must exist for that particular HTML tag. For more information, see Section 5.2.84, Tag/EndTag. |
Example |
This example finds the form that has an attribute of name with a value of login. Tag "Form" Attribute "Name" "Log on" EndTag |
Use With |
Startup, Terminal Launcher, Web, and Windows |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Usage |
ChangePassword <Variable> [<Text>] "Random" |
Arguments |
<Variable> A normal or runtime variable in which the password is stored. [Text] The text you want displayed in the Change Password dialog box. [Random] Random invokes the random password generator. |
Description |
Use ChangePassword to change a single variable. It is also used scenarios where password expiry is an issue. Set the <Variable> to the new password. The flag for this command is Random. If Random is:
|
Syntax Examples |
ChangePassword $NewPassword ChangePassword ?NewPassword "Please enter a new password" ChangePassword ?NewPassword Random |
Example |
Windows Application Definition This example detects the change password event. The application requires the current username and password, and then the new password and confirmation of the new password. The application definition creates a backup of the old password in case the password change fails (which is detected by the message that is displayed), and then generates and enters a new password. # Change Password Dialog BoxDialog Class #32770 Title "Change Password" EndDialog Set $PasswordBackup $Password Type $Password #1015 ChangePassword $Password Random Type $Password #1005 Type $Password #1006 Click #1# Change Password Failed Dialog Box Dialog Class #32770 Title "Change Password Failed" EndDialog # Set the password back as the password change failedSet $Password $PasswordBackup MessageBox "The change password process failed. Please retry the password change at your next log on. IT x453." |
For each dialog block in an application definition, the chosen User ID is reset and you must select it again. Select it again by using a SetPlat command or by having the user select again from a list.
When an application first presents a login screen, SecureLogin directs the user to select an appropriate User ID from a list. SecureLogin enters the selected User ID's credentials into the application and submits them.
If the login fails because incorrect credentials, SecureLogin prompts the user to change the credentials. SecureLogin does not retain User ID details and prompts the user to reenter them. However, this could result in changing the wrong credentials if the user selects the incorrect User ID.
To resolve this issue, use the SetPlat, ReLoadPlat, and ClearPlat commands. ReloadPlat sets the current User ID to the one which was last chosen (for the given application), or leaves the User ID unset if a User ID has not been selected previously. ClearPlat resets the last chosen User ID.
See also Section 5.2.61, ReLoadPlat and Section 5.2.11, ClearPlat.
Use With |
Java, Web, Windows |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Windows Usage |
Usage One:Click <#Ctrl-ID> [-Raw] [-Right]Usage Two:Click <# Ctrl-ID > [-Raw [-x < X Co-ordinate > -y <Y Co-ordinate >]] |
Web Usage |
Click <#Number> |
Arguments |
<#Ctrl-ID> The ID number of the control to be pressed. [-Raw] -Raw eliminates the mouse and sends a direct click. [-Right] -Right, used only with the -Raw flag, sends a right mouse click. <X Co-ordinate> X represents the horizontal coordinate relative to the client area of the application (not the screen). <Y Co-ordinate> Y represents the vertical coordinate relative to the client area of the application (not the screen). <#Number> The pound/hash symbol followed by the sequential number/control ID of the button to be pressed. Web specific The number of the button is determined by the Web page layout. See Section 5.2.22, DumpPage. Windows specific This is the control ID. Use the Windows Finder tool to discover the control ID. Java specific The index to use is put in an example application definition created by the Java wizard. |
Description |
When used with windows applications, the Click command sends a click instruction to the specified <#Ctrl-ID>. NOTE:If the button to be clicked does not have a control ID, the Type "\N" command often clicks the default button in a Windows application. You can set the –Raw flag if the button or control does not respond to the Click command. The –Raw flag causes SecureLogin to emulate the mouse and send a direct click message to the control. Using the -Right flag with the -Raw flag sends a right-click to the control. Setting the <#Ctrl-ID> to 0 (zero) sends the click instruction to the window on which the application definition is running. If -Raw is specified, then you can set the X coordinate and the Y coordinates. These coordinates are relative to the client area of the application, not the screen. When used with Web application definitions, the Click command takes a single argument, which is the sequential number on the page of the button to be pressed. Click #3 clicks the third button on the page. Keep in mind that due to Web page layout and design, the sequential order of the buttons might not be obvious, and that you might have to use the DumpPage (see Section 5.2.22, DumpPage) command to discover the field layout. |
Syntax Examples |
Click #1 Click #1 -Raw -Right Click -X 12 -Y 24 |
Example 1 |
Windows Application Definition This example detects the login dialog box, the username and password are entered, and button number 1 (in this case the login button) is clicked. # Log on Dialog Box Dialog Class #32770 Title "Log on" EndDialog Type $Username #1001 Type $Password #1002 Click #1 |
Example 2 |
Web Application Definition This example enters the username and password, and then the login button is clicked. Type $Username Type $Password Password Click #1 |
Example 3 |
Windows Application Definition This example uses the Java application, so there is no Control ID. Instead, the Click command is told to click a particular place on the window. # Log on Dialog Box Dialog Class #32770 Title "Log on" End Dialog Type $Username Type $Password Click -X 12 -Y 24 |
Use With |
All |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Variable Manipulator |
Usage |
Decrement <Variable> |
Arguments |
<Variable> The name of the variable to decrease in value. |
Description |
Use the Decrement command to subtract from a specified variable. For example, you can use decrement to count the number of passes a particular application definition has made. After the number of instances is equal to the specified number, you can instruct the application definition to run another task or end the application definition. This is useful when configuring an application whose login panel is similar to other windows within the application, or to easily control the number of attempts a user can have to access an application. Also see Section 5.2.41, Increment |
Syntax examples |
Decrement ?RunCount |
Example |
Windows Application Definition Each time the application definition is run, a variable is incremented. This example counts the number of times the dialog box is displayed. If the dialog box is displayed more than three times, the application is closed. If the login is successful, the count is reset. #Log on Dialog Box Dialog Class #32770 Title “Log on” EndDialog Decrement ?RunCount If ?RunCount Gt “3” MessageBox “Log on has been attempted too many times. The application will be closed.” KillApp “app.exe” Else Type $Username #1001 Type $Password #1002 Click #1 EndIf # Log on Successful Message Dialog Ctrl #1 Title “Log on Successful” EndDialog Set ?RunCount “0” |
Use With |
Windows |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Dialog Specifier |
Usage |
Event <Event Specifier> |
Arguments |
<Event Specifier> The application event to monitor. This corresponds to a Windows event, which usually begins with WM_. For example, WM_COPYDATA, WM_GETOBJECT, WM_GETTEXT For detailed information on Windows events, see the Microsoft MSDN Web site. Microsoft Spy++, or similar Windows message spy tools, are also useful for trapping event names in specific windows. Information regarding Spy ++ is also available on the MSDN Web site. |
Description |
Application definitions generally execute at the point when an application window is created. This corresponds to the WM_CREATE message that is received from an application window at startup. By adding the Event specifier to a dialog block, you can override this behavior, so that an application definition only executes when (and only when) the specified message is generated. If no Event specifier is given, it is equivalent to Event WM_CREATE. You can only apply the Event specifier within a Dialog and EndDialog statement block. Only one Event can be specified per Dialog block. If there is a requirement to monitor for multiple events, each must be specified within its own dialog block. For more information, see the MSDN Web site or other documentation on the Win32 messaging system. |
Syntax Examples |
Dialog Class "someclass" Event WM_ACTIVATE EndDialog MessageBox "Caught the WM_ACTIVATE message" |
Use with |
Startup, Terminal Launcher, Web, or Windows |
Novell SecureLogin version |
3.5 or later |
Type |
Action |
Description |
Use the Highlight command to set the focus of the Web page on a field. The command is useful for pages that do not have any control selected after loading or for any fields that change the behavior after gaining focus. It functions similar to the SetFocus command in Windows scripts. |
Example |
Web application definition If –Text "Logon" Highlight #1 Type $Username #1 Highlight #2 Type $Password #2 Type “\N” EndIf |
Use With |
All |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Variable Manipulator |
Usage |
Increment <Variable> |
Arguments |
<Variable> The name of the variable to increase in value. |
Description |
Use the Increment command to add to a specified variable. For example, you can use Increment to count the number of passes a particular application definition has made. After the number of instances is equal to the specified number, you can instruct the application definition to run another task or end the application definition. This is useful when configuring an application whose login panel is similar to other windows within the application, or to easily control the number of attempts a user can have to access an application. Also see Section 5.2.17, Decrement |
Syntax examples |
Increment ?RunCount |
Example |
Windows Application Definition Each time the application definition is run, a variable is incremented. This example counts the number of times the dialog box is displayed. If the dialog box is displayed more than three times, the application is closed. If the log in is successful, the count is reset. #Log on Dialog Box Dialog Class #32770 Title “Log on” EndDialog Increment ?RunCount If ?RunCount Gt “3” MessageBox “Log on has been attempted too many times. The application will be closed.” KillApp “app.exe” Else Type $Username #1001 Type $Password #1002 Click #1 EndIf # Log on Successful Message Dialog Ctrl #1 Title “Log on Successful” EndDialog Set ?RunCount “0” |
Use With |
Windows |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Dialog Specifier |
Usage |
ParentEnd Parent |
Arguments |
None |
Description |
Use the Parent command to begin a parent block in which the statements act upon a window's parent. The commands that follow the Parent command function identically to commands used in a dialog block; if they equate to false, then the application definition ends. For example, the command Title in a Parent block returns false if the title of the Parent does not match the one specified in the command. However, if a command in a parent block returns a false result, the execution does not skip to the next parent block, as it would in a dialog block. Instead, the parent block proceeds to the next dialog block, or the application definition terminates if no further dialog blocks exist. The Parent command is particularly useful in applications where the dialog box (for example login dialog box) is the child of an open window, typically in the background. If you are unable to single sign-on to an application after enabling it with the wizard, you typically need to specify parent blocks. You can also use the Parent command to execute commands on a dialog box’s parent. For example, it is possible to get a application definition to click a button on the parent window. An example of this use is shown in Example 2. EndParent Command Use the EndParent command to terminate a Parent block and set the subject of the application definition back to the original window. You can nest the command, thereby allowing the parent block to act on the parent of the parent. NOTE:If you use the wizard or try to enable an application and it does not seem work, try by using the Parent command. It is able to handle windows that are within windows, and so on. |
Example 1 |
Windows Application Definition This example specifies the dialog box that is used for login. In this case, the parent of the login box has a class of "Centura:MDIFrame". #Log on Dialog BoxDialog Class "Centura:Dialog" Ctrl #4098 Ctrl #4100 Title "Log on" Parent Class "Centura:MDIFrame" EndParent EndDialog Type $Username #4098 Type $Password #4100 Click #4101 |
Example 2 |
Windows Application Definition This example is used to click a button on the login window’s parent. # Log on Dialog Box Dialog Class #32770 Title "Log on" EndDialog Type $Username #1001 Type $Password #1002 Parent Click #1 EndParent |
Use With |
Terminal Launcher, Windows. This command applies specifically to HLLAPI, WinHLLAPI and HLLAPI 16 terminal emulators. |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Windows Usage Terminal Launcher Usage |
ReadText <#Ctrl-ID> <?Variable> ReadText <?Variable> <Character-Number> <Row-Number> <Column-Number> |
Arguments |
<#Ctrl-ID> The control ID number of the text to read. <?Variable> The variable that receives the text that is read. <Character-Number> The number of characters to read. <Row-Number> The horizontal position number of the first character to read (for example, row). <Column-Number> The vertical position number of the first character to read (for example, column). |
Description |
Use the ReadText command to run in both Windows and Terminal Launcher application definitions. Although the usage and arguments for the use of ReadText with Windows and Terminal Launcher are different, the results of each command are the same. Windows Application Definition: In a Windows application definition, the ReadText command reads the text from any given <#Ctrl-ID>, and sends it to the specified variable. For this command to function correctly, the <#Ctrl-ID> must be valid. Terminal Launcher Application Definition: In a Terminal Launcher application definition, the ReadText command reads a specified number of characters, starting at the <Row-Number>, and sends those characters to the specified <Variable>. The ReadText command does not work with Generic or Advanced Generic emulators, it only works with HLLAPI and some DDE emulators. For Generic or Advanced Generic emulators, use the If -Text or Gettext commands. For more information, see Section 5.2.39, If/Else/EndIf and Section 5.2.35, GetText. |
Example 1 |
HLLAPI emulator Readtext ?result "X" "Y" "Z" X = The number of characters to read. Y= The row from which the characters are read. Z= The column from which the characters are read. |
Example 2 |
Windows script ReadText #1004 ?result |
Syntax examples |
ReadText #301 ?Text ReadText ?Text 4 6 |
Example 1 |
Windows Application Definition The same Title and Class appear in the error message dialog box when a user fails to log in. This example distinguishes between errors and provides users with more specific information, rather than a general message stating that their username and password is incorrect, or the account is locked. In this case, the example reads the error message, clicks , and prompts the user with a customized message.# Log on Failed Message Dialog Class #32770 Title "Log on Failed" EndDialog ReadText #65535 ?ErrorMsg Click #1 If "Invalid Username" -In ?ErrorMsg DisplayVariables "Please verify your Username and try again." $Username Type $Username #1001 Type $Password #1002 Click #1 EndIf If "Invalid Password" -In ?ErrorMsg DisplayVariables "Please verify your Password and try again." $Password Type $Username #1001 Type $Password #1002 Click #1 EndIf If "Account Locked" -In ?ErrorMsg MessageBox "Your account is locked. Please contact the Helpdesk on x3849." Endscript EndIf |
Example 2 |
Windows Application Definition This example reads the text from a Control ID and sets the database variable so the user is not prompted to set the variable. # Log on Dialog Box Dialog Class #32770 Title "Log on" EndDialog ReadText #15 ?Database If -Exists $Database Else Set $Database ?Database EndIf Type $Username #1001 Type $Password #1002 Type $Database #1003 Click #1 |
Example 3 |
Terminal Launcher Application Definition This example reads a message in a Terminal Emulator and displays the message in a user-friendly format. ReadText ?Message 30 24 2 MessageBox ?Message |
Use With |
All |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Usage |
RegSplit <RegEx> <Input-String> [<Output-String1> [<Output-String2>]...] |
Arguments |
<RegEx> The regular expression. <Input-String> The string that to split. <Output-String1> The first subexpression. <Output-String2> The second subexpression. |
Description |
Use the RegSplit command to split a string by using a regular expression. <Output-String1> and <Output-String2> contain the first and second subexpressions. For more information on regular expression, see the Electronic Text Center or search the Microsoft MSDN library. |
Example |
Windows Application Definition This example copies text from Control ID #301 to the ?Text variable. The RegSplit command is then used to strip the username details out of the text that was read. The platform is set to that username, and the correct password is entered by SecureLogin. # Log on Dialog Box Dialog Class #32770 Title "Log on" EndDialog ReadText #65535 ?Text RegSplit "Please enter the password for (.*) account" ?Text ?UserSetPlat ?User Type $Username #1001 Type $Password #1002 Click #1 |
Open Text Example |
#?InputString: "This is a long string with a few components in it" |
Command |
RegSplit "This (.*) a long (.*) with (.*) components (.*)" ?InputString ?First ?Second ?Third ?Fourth |
Result |
?First = "is", ?Second = "string", ?Third = "a few", ?Fourth = "in it" |
When an application first presents a login screen, SecureLogin displays a message box prompting the user to select an appropriate platform from a list. After they are selected, SecureLogin enters the chosen platform's credentials into the application and submits them.
If login fails because of incorrect credentials, SecureLogin prompts the user to change his or her credentials. SecureLogin does not retain the platform details and prompts the user to reenter the information. This could result in the user changing the wrong credentials if they select the incorrect platform.
The SetPlat, ReLoadPlat, and ClearPlat commands resolve this issue. ReloadPlat sets the current platform to the one that was last chosen (for the given application), or if a platform not previously selected, the command leaves it unset.
See also Section 5.2.61, ReLoadPlat and Section 5.2.11, ClearPlat.
Use With |
All |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Usage |
RestrictVariable <Variable-Name> <Password-Policy> |
Arguments |
<Variable-Name> The name of the variable to restrict. <Password-Policy> The name of the policy to enforce for the variable. |
Description |
Use the RestrictVariable command to monitor a <Variable> and enforce a specified <Password-Policy> on the <Variable>. Any variable specified must match the policy or it is not saved. When restricting variables by using policies, if you are using a more restrictive policy than is already in place, and you restrict a variable that does not match the policy now in effect, then the user cannot save it the first time. This is because when SecureLogin detects that there is no saved credential, a user who has a password of six characters, cannot save it if the policy restricts the $Password variable to eight characters and two numbers. Example 2 works around this by restricting a new password variable (?NewPwd), instead of restricting the $Password variable. The user can store an existing password when SecureLogin prompts for the credentials the first time, and enforces the stronger password policy when the password expires in x days. You can restrict any variable by using a password policy, not just a $Password. You can also use RestrictVariable to make sure other variables are entered in the correct format. For example, you can enforce that $Username is always lowercase or $Database is 6 characters and no numbers. |
Example 1 |
Windows Application Definition This example uses the application definition to restrict the $Password variable to the Finance password policy. The user's password must match the policy when he or she first saves the credentials. When the password requires changing, the application definition generates a new password randomly based on that policy (no user intervention is required). # Set the Password to use the Finance Password Policy RestrictVariable $Password FinancePwdPolicy #Log on Dialog Box Dialog Class #32770 Title "Log on" EndDialog Type $Username #1001 Type $Password #1002 #Change Password Dialog Box Dialog Class #32770 Title "Change Password” EndDialog Type $Username #1015 Type $Password #1004 ChangePassword $Password Random Type $Password #1005 Type $Password #1006 Click #1 |
Example 2 |
Windows Application Definition This example uses the application definition to restrict the ?NewPwd variable to the Finance password policy. When the application starts for the first time and prompts the user to enter his or her credentials, then the current password ($Password) is saved and used. When the password expires, the password policy is enforced on any new password. This is a way to enforce more restrictive password policies than are currently in place when you cannot guarantee that all existing passwords meet the new policy. # Set the Password to use the Finance Password Policy RestrictVariable ?NewPwd FinancePwdPolicy # Log on Dialog Box Dialog Class #32770 Title "Log on" EndDialog Type $Username #1001 Type $Password #1002 Click #1 # Change Password Dialog Box Dialog Class #32770 Title "Change Password" EndDialog Type $Username #1015 Type $Password #1004 ChangePassword ?NewPwd Random Type ?NewPwd #1005 Type ?NewPwd #1006 Set $Password ?NewPwd Click #1 |
Use With |
Advanced Web application definitions |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Usage |
SelectListBoxItem <Text of Item to set to> [<#Item Number>] [<-multiselect>] |
Arguments |
<Text of Item to set to> The text item that you want SecureLogin to select in the list box. <#Item Number> When multiple list boxes are found, this specifies which list box to address. <-multiselect> Used to select multiple list box entries by using a subsequent SelectListBoxItem command. |
Description |
Use the SelectListBoxItem command to select entries from a list box. For instruction on determining item numbers, see Section 5.2.22, DumpPage. |
Example |
SelectListBoxItem "Remember Defects" #2 -multiselect SelectListBoxItem "Remember Enhancements" #2 -multiselect |
Use With |
Terminal Launcher |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Usage |
SendKey <Text> |
Arguments |
<Text> The text typed into the emulator screen. |
Description |
Use the SendKey command to work only with Generic and Advanced Generic emulators. You can use the SendKey command in the same manner as the Type command. Generally, the Type command is the preferred command to use. The Type command places the text into the clipboard, and then pastes it into the emulator screen. The SendKey command enters the text directly into the emulator screen. Variables do not work with the SendKey command. If you want to use variables, use the Type command. The Type command has many special functions, and some you can use with the SendKey command. For more information, see Section 5.2.87, Type, and for more details on these functions, see Section 7.0, Reference Commands and Keys. |
Example |
Terminal Launcher Application Definition The example sends the username and password to the terminal emulator. #Send Username SendKey "writer" SendKey "\N" #Send Password SendKey "Hu7%f" SendKey "\N" |
Use With |
All |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Usage 1 |
SetPlat <Application-Name> |
Usage 2 |
SetPlat <RegEx> <Variable> <#Ctrl-ID> |
Arguments |
<Application-Name> Application name from which to read the variables. <RegEx> Regular expression to use as application name. <Variable> Use a previously set ?Variable, such aa PickList (see Section 5.2.55, PickListAdd). <#Ctrl-ID> The control ID number of the regular expression. NOTE:For information regarding regular expressions, see Electronic Text Center. |
Description |
By default, variables are stored directly against the platform or application on which you have SecureLogin enabled. For example, if you enable Groupwise.exe, the Groupwise credentials are stored against the Groupwise.exe platform. SetPlat sets the platform or application from which variables are read and saved if you have:
Other uses of SetPlat include:
|
Example 1 |
Web Application Definition The following is a standard dialog box for accessing a password‑protected site by using Netscape Navigator. ![]() When you specify the SetPlat command, the same Username and Password for www.serversystems.com are entered to log in to any site (and are obviously invalid for any other site). , , , and fields for this dialog box, they are always the same. If you stored the Username and Password against this platform without using theHowever, the previous dialog box always contains the name of the Web site to which to log in. You can use this name as the unique identifier in order to set a new platform and to save the login credentials. Using a dialog block with a SetPlat statement: The solution is to use a dialog block with a SetPlat statement, such as: Dialog Ctrl #330 Ctrl #214 Ctrl #331 Ctrl #1 Ctrl #2 Title "Username and Password Required" SetPlat #331 "Enter username for (.*) at (.*):" EndDialog Type $Username #214 Type $Password #330 Click #1 The power of this application definition is the line: SetPlat #331 "Enter username for (.*) at (.*):" This reads the line from dialog control ID 331, enters the username for Control Panel at www.serversystems.comNext, and applies the regular expression to this text. Regular expressions are a way of manipulating text strings; however, for most purposes a few very basic commands work. |
For information regarding regular expressions, see Electronic Text Center. When the user runs the application definition, he or she sees the username and password saved as www.serversystems.com. The text matched inside the brackets then becomes the symbol application. If a dialog <#Ctrl-ID> is not specified, the symbol application is unconditionally changed to the application specified in <RegEx>. An unconditional SetPlat command is only valid if specified before Dialog/EndDialog statements. |
|
Example 2 |
Windows Application Definition This example displays a pick list and sets a new platform so multiple users can log in to the application. In this case, SetPlat creates a new platform called Default User, Global Administrator, or Regional Administrator, and the respective $Username and $Password is saved there. # log on Dialog Box Dialog Class #32770 Title "Log on" EndDialog PickListAdd "Default User" PickListAdd "Global Administrator" PickListAdd "Regional Administrator" PickListDisplay ?Choice "Please select the account you wish to use"-NoEdit SetPlat ?Choice Type $Username #1001 Type $Password #1002 Click #3 |
Use with |
All |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Usage |
SetPrompt <Prompt-Text> |
Arguments |
<Prompt-Text> The customized text prompt displayed in the Enter SecureLogin Variables dialog box. |
Description |
Use the SetPrompt command to customize the text in the Enter SecureLogin Variables dialog boxes. These dialog boxes are used to prompt the user for new variables. You can also use the DisplayVariables command to customize the prompt text in the dialog box (for previously stored variables). For more information, see Section 5.2.20, DisplayVariables. NOTE:Positioning of the Setprompt command is crucial. Position it before the first usage of each variable to name that variable, and apply the final Setprompt to the text displayed at the top of the prompt screen. |
Example 1 |
Windows Application Definition This example replaces the default text prompt in the Enter SecureLogin Variables dialog box, and places the SetPrompt command at the bottom of the application definition. # Log on Dialog Box Dialog Class #32770 Title "Log on" EndDialog Type $Username #1001 Type $Password #1002 Click #1 SetPrompt "Please enter your Username and Password for accessing the Human Resources system. These credentials will be remembered by SecureLogin and you will be automatically logged on in future. IT Helpdesk x4564" |
Example 2 |
Windows Application Definition This example replaces the text prompt next to any variable entry field in the Enter SecureLogin Variables box, and places the SetPrompt command immediately before the variable in the application definition. # Log on Dialog Box Dialog Class #32770 Title "Log on" EndDialog SetPrompt "Enter Username==>" Type $Username #1001 SetPrompt "Enter Password==> "Type $Password #1002 Click #1 SetPrompt "Please enter your Username and Password for accessing the Human Resources system. These credentials will be remembered by SecureLogin and you will be automatically logged on in future. IT Helpdesk x4564" |
Use With |
Startup, Terminal Launcher, Web, or Windows |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Flow Control |
Usage |
Sub <Name> EndSub |
Arguments |
<Name> Any name entered to identify the subroutine. |
Description |
Use the Sub/EndSub commands around a block of lines within an application definition to denote a subroutine. You can also call a subroutine by using the Call command. For more information, see Section 5.2.8, Call. |
Example |
Terminal Launcher Application Definition This example checks the emulator screen for the text login or wrong password. If either is found, the appropriate subroutine is called and run before the next part of the application definition. If -Text "Log on" Call "Log on" EndIf If -Text "Wrong Password" Call "WrongPassword" EndIf Sub Login Type $Username Type @E Type $Password Type @E EndSub Sub WrongPassword DisplayVariables "Enter correct password" $Password Call Login EndSub |
Use With |
Java, Windows |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Dialog Specifier |
Usage |
Title <Window-Title> |
Arguments |
<Window-Title> The text to test against the window title. |
Description |
Use the Title command to retrieve the title of a window and compare it against the string specified in the <Window-Title> argument. For this block of the application definition to run, the retrieved window title and the <Window-Title> argument must match the text supplied to the Title command in the dialog block. Title is one of the main commands to identify a window. However, the Title command alone might not be enough. If there is more than one window in a platform (application) with the specified title, the SecureLogin application definition runs every time that window is detected. Always place the Title command after all other commands in the Dialog block. To uniquely identify a window, the Title command is typically used with the Class or Ctrl commands. For more information, see Section 5.2.10, Class and Section 5.2.15, Ctrl. NOTE:Use the Window Finder tool to determine the window title. |
Example |
Windows Application Definition This example tests the dialog box to see if it has the correct title. If the title is not correct, the application definition passes on to the next dialog block. # Log on Dialog Box Dialog Class #32770 Title "Logon" EndDialog Type $Username #1001 Type $Password #1002 Click #1 |
Use With |
Java, Terminal Launcher, Web, or Windows |
SecureLogin Version |
3.5 to 6.1 SP1 |
Type |
Action |
Terminal Usage |
Type [-Raw] <Text> |
Windows Usage |
Type <Text> [<#Ctrl-ID>] Type [-Raw] <Text> Type [-order] <Text> [<#Order-ID>] Type [-msg] <Text> [<#Ctrl-ID>] |
Web Usage |
Type <Text> [<#Field-ID>] Type <Text> ["password"] |
Arguments |
[-Raw] By default, when typing into a Terminal Emulator or Windows application, SecureLogin verifies that the window exists before continuing. This verification process is disabled when the -Raw argument is provided. Further, instead of trying to set the text in the field directly, this option simulates actual keystrokes, causing SecureLogin to type into whichever window has focus. [-order] If the control IDs are not constant, utilize the -order switch to type into a control based on the creation order and not the tab order. [-msg] This option can be used when a Type command is sending the data correctly, but the application is not successfully reading the data. The -msg modifier sends the data character by character versus sending the text string all at once. This -msg option is often useful for older windows applications, particularly older versions of Lotus* Notes*. <Text> The text to type into this area. This text can be static text, such as ABC, or any SecureLogin variable, such as $Username. [<#Ctrl-ID>] For Windows application definitions, this optional argument specifies the control into which to type the text. Use the Windows Finder tool to extract these control IDs. For more information, see Windows-Specific:. [<#Order-ID>] For Windows application definitions, this parameter specifies the control (based on the creation order) into which to type the text. [<#Field-ID>] For Web application definitions, this optional argument specifies the text field into which to type the text. For more information, see Web-Specific:. [password] For Web application definitions, this optional argument specifies to perform this type this the password field on this form. If [password] is used, that application's application definition cannot use a <#Ctrl-ID> argument. For more information, see Web-Specific:. |
Description |
Use the Type command to enter data, such as usernames and passwords, into applications. There are reserved character sequences that are used to type special characters, for example TAB and ENTER. If it is not possible to determine Control IDs in a Windows application, and the Type command is not working, use the SendKey command instead. Windows-Specific: In Windows, if the <#Ctrl-ID> argument is:
Web-Specific: For Web pages there are two ways to specify which field receives <Text>.
For example, the Type command immediately preceding the Type command that has the [Password] argument is sent to the text field immediately preceding the first password field. |
Example 1 |
Windows Application Definition This example is a typical use of the Type command in a Windows application definition. # Log on Dialog Box Dialog Class #32770 Title "Log on" EndDialog Type $Username #1001 Type $Password #1002 Type "DB2" #1003 Click #1 |
Example 2 |
Windows Application Definition This example shows the use of the -Raw switch. This switch is not actually required in this instance, and is only there as an example. # Calculator Is Active Dialog Class #SciCalc Title "Calculator" EndDialog Type -Raw "15" Type -Raw "+" Type -Raw "20" Type -Raw "=" |
Example 3 |
Windows Application Definition This example shows the use of the -msg switch. In this instance the switch is not actually required and is only shown as an example of the use of Password as the -msg argument. # Calculator Is Active Dialog Class #SciCalc Title "Calculator" EndDialog Type -msg $Password #480". |
Example 4 |
Windows Application Definition The following syntax examples compare and contrast the use of the various Type command arguments. type #1 "text" Types type text into control with ID of 1 type #1 "text" -order Types text into the first control found in the dialog when enumerating the children. type #1 "text" -msg Types into the first control with an ID of 1 it finds within the set of windows allowing some time for the control to be created.type #1 "text" -raw type #1 "text" -focus Ignores the unused parameter #1 |
Example 5 |
Windows Application Definition This example shows the use of the -order switch and demonstrates the possible “order” of the parameter. type -order #1 "some text" type #2 "some text" -order type "some text" -order #3 |
Example 6 |
Web Application Definition This example uses the SecureLogin agent to automatically generate this application definition for the mail.yahoo.com Web site. This example shows the use of Password as the [<Field Name>] argument. Type $Username Type $Password Password In the Application Definition above, the SecureLogin agent locates the first password field. The first Type command sends $Username to the field immediately before the password field. The second Type command sends $Password to the password field. The same Application Definition could be rewritten using absolute placement as shown below. In the following example, the Submit command is also used to automatically submit the page. Type $Username #1 Type $Password #2 Submit |
SecureLogin can send special keystrokes to Windows and Internet based applications to emulate the user's keyboard entry. The Type command can pass keystrokes through to the window that the application definition is using. These special commands include the ability to select menu items, send Alt key combinations, and send other keyboard combinations.
You can also use the Type command to send a combination of raw key commands. The Section 7.2, Windows Keyboard Functions details the available keyboard sequences you can use with the Type command.
Terminal Launcher uses the High Level Language Application Programming Interface (HLLAPI) to interface with a wide range of mainframe emulators that implement this programming standard. The commands are the ones that you can use in the SecureLogin application definition Type command. These commands perform specific emulator and mainframe functions. For example, you can send an Enter, Tab, or cursor key or issue a mainframe emulator print screen or reset function.
The @ commands are used in application definition language in the following format:
TYPE @ command
WAITFORTEXT "Log on:"
Type $username
Type @T
Type $password
Type @E
Section 7.2, Windows Keyboard Functions details the available terminal emulator commands that you can use within a terminal emulator application definition.