lr之RTE脚本(telnet方式访问水木清华)

RTE脚本

Action1()
{
int col, row,flag,cnt;
char match [100];
        /* *** The terminal type is VT420-7. */
        TE_connect(
                "comm-type = telnet;"
                "host-name = newsmth.net;"
                "set-window-size = true;"
                "security-type = unsecured;"
                "terminal-type = vt420-7;"
                "terminal-model = vt320;"
                , 60000);
        if (TE_errno != TE_SUCCESS)
                return -1;
        TE_wait_text("请输入代号:", 90);
        TE_wait_cursor(13, 23, 100, 90);
        lr_think_time(2);
        TE_type("gu");
        TE_type("es");
        TE_type("t");
        TE_wait_cursor(18, 23, 100, 90);
        TE_type("<kReturn>");
        TE_wait_text("\xb0\xb4\xc8\xce\xba\xce\xbc\xfc\xbc\xcc\xd0\xf8"" ..", 90);

        TE_wait_cursor(48, 24, 100, 90);
        lr_think_time(5);
        TE_type("<kReturn>");
        TE_type("<kLeft>");
        TE_wait_text("\xb0\xb4\xc8\xce\xd2\xe2\xbc\xfc\xbc\xcc\xd0\xf8""...", 90);
        TE_wait_cursor(20, 24, 100, 90);
        lr_think_time(3);
        TE_type("<kLeft>");
        cnt=1;
        for (;;) {
        if (cnt<=10000) {
                        cnt++;
                }
                else {break;};
        }
        TE_wait_text("RunningLife", 90);

        TE_wait_cursor(20, 24, 100, 90);
        TE_type("<kLeft>");
        return 0;
}
 
lr之RTE脚本(telnet方式访问水木清华)
 
提问,为什么最后,用了一个for循环,它的作用是什么?

posted on 2008-10-07 17:30  测试者家园  阅读(973)  评论(0编辑  收藏  举报

导航