SecureCRT循环检查设备状态

  1: #$language = "VBScript"
  2: #$interface = "1.0"
  3: 
  4: ' This automatically generated script may need to be
  5: ' edited in order to work correctly.
  6: 
  7: Sub Main
  8: 
  9:     Dim cmd_show_chassis
 10:     Dim status_up, status_down
 11:     Dim time_minutes
 12: 
 13:     cmd_show_chassis = "show chassis"
 14:     status_up = "up"
 15:     status_down = "down"
 16:     test_data = "01:12"
 17: 
 18:     crt.Screen.Synchronous = True
 19: 
 20:     Do
 21:         crt.Screen.Send cmd_show_chassis & vbCr
 22:         if crt.Screen.WaitForString(status_down, 5) then
 23:             crt.Screen.Send vbCr
 24:             crt.Sleep 10000
 25:         else
 26:             exit do
 27:         end if
 28:     Loop
 29: 
 30:     crt.Dialog.MessageBox _
 31:         "GOOD." & vbcrlf & _
 32:         "All Cards is UP! Pelase Enjoy it Now...."
 33: 
 34:     crt.Screen.Synchronous = False
 35: End Sub
 36: 
服务项目 技术咨询 微信图书 微信视频 微信代码 定制开发 其他福利
服务入口 QQ群有问必答
查看详情
一本书解决90%问题
查看详情
微信开发视频
小程序开发视频
免费代码
¥1888阿里云代金券
查看详情
营销工具
微信特异功能
原文地址:https://www.cnblogs.com/txw1958/p/2210082.html