/循环执行shell脚本
#$language = "VBScript"
#$interface = "1.0"
crt.Screen.Synchronous = False
Sub Main
set fs = createobject("scripting.filesystemobject")
Set conf = crt.OpenSessionConfiguration("10.0.0.1")
Set tab = conf.ConnectInTab()
Dim logfile
logfile = "E:\ALFT\Log\ALFT_20170411145534.log"
crt.Session.LogFileName = logfile
crt.Session.Log false
DO While true
crt.Screen.WaitForString "root@LTE-GW:~#"
;暂停1秒钟
crt.sleep 1000
crt.Screen.Send AAAA
crt.Screen.WaitForString "root@LTE-GW:~#"
crt.Screen.Send BBBB
crt.Screen.WaitForString "root@LTE-GW:~#"
crt.Screen.Send CCCC
crt.Screen.WaitForString "root@LTE-GW:~#"
crt.Screen.Send DDDD
loop
crt.Screen.Synchronous = False
crt.Session.Log False
crt.Session.Disconnect
crt.quit
End Sub
借助终端工具SecuretCRT.exe
通过cmd命令执行这个shell脚本,mySystem(ini_securecrtPath,_T("/script Log/alft.vbs"),2);
版权声明:本文为shufac原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。