极湖

无不用其“极”

让 secureCRT 定时发送命令的脚本

,

想让secureCRT在一定时间后发送命令,为此做了一个脚本如下:
var startTime = (new Date()).getTime();
var afterSeconds = 60;
var executed = false;

function main() {
    crt.Screen.Send("date\n");
    while(!executed) {
        sendCommand();
    }
}

function sendCommand() {
    if((new Date()).getTime() > (startTime + (afterSeconds*1000))) {
        crt.Screen.Send("echo It is time to execute command\n");
        crt.Screen.Send("date\n");
        executed = true;
    }
}

保存成文件,然后通过菜单 script -> Run 选择该文件即可。

s9yjQuery plugin 改造:Select Box replacement

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

February 2012
S M T W T F S
January 2012March 2012
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29