Share this page

# Example: TE_send_text

This example shows the use of TE_send_text to send `help` and `log off` commands that contain control codes:

    /* *** The terminal type is VT 100. */

    TE_connect(

        "comm-type = telnet;"

        "host-name = myHost;"

        "terminal-id = ;"

        "set-window-size = true;"

        "security-type = unsecured;"

        "terminal-type = vt100;"

        "terminal-model = vt100;"

        "login-command-file = ;"

        "terminal-setup-file = ;"

        , 60000);

    if (TE_errno != TE_SUCCESS)

        return -1;

    TE_wait_cursor(24, 2, 100, 90);

    /* duration = 688, replay duration = 400, difference = 288 */

    lr_think_time(3);

    TE_type("MyHost<kReturn>");

    /* duration = 2579, replay duration = 800, difference = 1779 */

    lr_think_time(18);

    TE_type("MyPassword<kReturn>");

    /* duration = -62, replay duration = 200, difference = -262 */

    lr_think_time(2);

    /* following escape sequence is mapped to "help" command */

    TE_send_text("\x1bOP");

    /* duration = -16, replay duration = 200, difference = -216 */

    lr_think_time(3);

    /* following escape sequence is mapped to "logout" command */

    TE_send_text("\x1bOR");

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: