VBS脚本添加暂停。 20
#$language="VBScript"#$interface="1.0"crt.Screen.Synchronous=True'Thisautomaticallyge...
#$language = "VBScript"
#$interface = "1.0"
crt.Screen.Synchronous = True
' This automatically generated script may need to be
' edited in order to work correctly.
Sub Main
crt.Screen.WaitForString "Username:"
crt.Screen.Send "admin" & chr(13)
crt.Screen.WaitForString "Password:"
crt.Screen.Send "admin" & chr(13)
crt.Screen.WaitForString "Switch>"
crt.Screen.Send "en" & chr(13)
crt.Screen.WaitForString "Switch#"
crt.Screen.Send "show ver" & chr(13)
crt.Screen.WaitForString "Switch#"
crt.Screen.Send "conf t" & chr(13)
crt.Screen.WaitForString "Switch(config)#"
crt.Screen.Send "ipadd 192.168.2.89 255.255.255." & chr(8) & chr(8) & "2.0" & chr(13)
crt.Screen.WaitForString "Switch(config)#"
crt.Screen.Send "http" & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & "http enable" & chr(13)
crt.Screen.WaitForString "Switch(config)#"
crt.Screen.Send "no ipadd" & chr(13)
crt.Screen.WaitForString "Switch(config)#"
crt.Screen.Send "no ip ad" & chr(8) & chr(8) & chr(8) & "add" & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & "exit" & chr(13)
crt.Screen.WaitForString "Switch#"
crt.Screen.Send "show run" & chr(13)
crt.Screen.WaitForString "....press ENTER to next line, CTRL_C to break, other key to next page...."
crt.Screen.Send " "
End Sub
在空行的地方。就是http enable 后面加一个暂停。让我按一下键盘就继续执行。
这是在交换机上做测试的脚本。由SecureCRT来执行。
我已经找到了方法。。。去掉那个chr(13)代表回车就行了。。自己再按一次回车脚本就继续了 展开
#$interface = "1.0"
crt.Screen.Synchronous = True
' This automatically generated script may need to be
' edited in order to work correctly.
Sub Main
crt.Screen.WaitForString "Username:"
crt.Screen.Send "admin" & chr(13)
crt.Screen.WaitForString "Password:"
crt.Screen.Send "admin" & chr(13)
crt.Screen.WaitForString "Switch>"
crt.Screen.Send "en" & chr(13)
crt.Screen.WaitForString "Switch#"
crt.Screen.Send "show ver" & chr(13)
crt.Screen.WaitForString "Switch#"
crt.Screen.Send "conf t" & chr(13)
crt.Screen.WaitForString "Switch(config)#"
crt.Screen.Send "ipadd 192.168.2.89 255.255.255." & chr(8) & chr(8) & "2.0" & chr(13)
crt.Screen.WaitForString "Switch(config)#"
crt.Screen.Send "http" & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & "http enable" & chr(13)
crt.Screen.WaitForString "Switch(config)#"
crt.Screen.Send "no ipadd" & chr(13)
crt.Screen.WaitForString "Switch(config)#"
crt.Screen.Send "no ip ad" & chr(8) & chr(8) & chr(8) & "add" & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & chr(8) & "exit" & chr(13)
crt.Screen.WaitForString "Switch#"
crt.Screen.Send "show run" & chr(13)
crt.Screen.WaitForString "....press ENTER to next line, CTRL_C to break, other key to next page...."
crt.Screen.Send " "
End Sub
在空行的地方。就是http enable 后面加一个暂停。让我按一下键盘就继续执行。
这是在交换机上做测试的脚本。由SecureCRT来执行。
我已经找到了方法。。。去掉那个chr(13)代表回车就行了。。自己再按一次回车脚本就继续了 展开
3个回答
展开全部
只知道在调试环境vbsedit下添加 输入 stop 可以使程序暂停,按F5继续。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
一个很弱智的方法……
Msgbox "stop"
Msgbox "stop"
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询