您的位置:首页 > 其它

SecureCRT循环检查设备状态

2013-12-22 11:15 176 查看
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:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: