Scripting: Wavelink TE Auto Login

Version 5

    Verified Product Versions

    Wavelink Terminal Emulation 7.3

    Description:

     

    This document will go over the process of how to create / record a script to auto login to a host application with Wavelink TE. In this tutorial I will be using an AS400 to record my auto login. The actual user names and passwords have been removed.

     

    How to:

     

    1. Connect to you host application so that you are at the login screen.

    autologin1.JPG

    2. In the upper left select the following:

         a. Term

         b. Scripting

         c. Start Capture

     

    3. You will then be prompted to verify the screen

    autologin2.JPG

         a. Verifying the screen should not be skipped

     

    Note: The purpose of verifying the screen is to ensure this script only runs on the login page

     

    4. when verifying the screen select a few identifiers that are unique to the login page.

    autologin4.JPG

    5. Once you have verified the screen, the capture is running, log in into the host application.

     

    6. Once you have logged in, use the "Stop Capture" in the lower right of the screen.

    autologin5.JPG

    7. you will now be prompted to give your recorded script a name and a choice of actions to start the script.

         a. Name your script

         b. Uncheck on screen update

         c. Select "When Session Connects"

         d. Click on the host profiles tab and select the appropriate profile that will use the script.

         e. Click OK

     

    autologin7.JPG

    autologin8.JPG

    8. **NOTE** when finished recording, run the script. In some scenarios the script may run faster than the host will allow.. if that happens, you will need to add delays to the script. In the below example, I cleaned up the script and removed the message lines that the recorder enters,added delays between the actions and moved the actions to be included in the IF statement

     

    Example:

     

    Original Script:

    Script( Autologin )
    Profile( 5250 )
    Activate( Connection )
        Comment: Verify that this is the desired screen.
        If_Not( Boolean_And( String_Equal( Get_Screen_Text_Length( 1, 36, 7 ), "Sign On", 0, FALSE ), String_Equal( Get_Screen_Text_Length( 6, 17, 4 ), "User", 0, FALSE ), String_Equal( Get_Screen_Text_Length( 7, 17, 8 ), "Password", 0, FALSE ) ) )
            Return
        End_If
        Set_Cursor_Position( 6, 53 )

        Message( "Starting Script", 3 )

        Keypress_String( "USERNAME" )
        Keypress_Key( "5250", "Tab" )
        Keypress_String( "PASSWORD" )
        Keypress_Key( "5250", "Enter/Send" )
        Keypress_Key( "5250", "Enter/Send" )

        Message( "Script Done", 3 )
        Return

     

    Edited Script:

    Script( Autologin )
    Profile( 5250 )
    Activate( Connection )
        Comment: Verify that this is the desired screen.
        If_Not( Boolean_And( String_Equal( Get_Screen_Text_Length( 1, 36, 7 ), "Sign On", 0, FALSE ), String_Equal( Get_Screen_Text_Length( 6, 17, 4 ), "User", 0, FALSE ), String_Equal( Get_Screen_Text_Length( 7, 17, 8 ), "Password", 0, FALSE ) ) )
            Set_Cursor_Position( 6, 53 )
            Delay( 1000 )
            Keypress_String( "USERNAME" )
            Keypress_Key( "5250", "Tab" )
            Delay( 1000 )
            Keypress_String( "PASSWORD" )
            Keypress_Key( "5250", "Enter/Send" )
            Delay( 1000 )
            Keypress_Key( "5250", "Enter/Send" )
            Delay( 1000 )
            Return
        End_If

        Return