本帖最后由 余钦 于 2020-9-5 16:30 编辑
以下代码是我初步写的。根据自己用crt录的脚本修改而来。
我一直在解决,交换回显过多怎么进行下一个命令,这里自动加入了空格命令感觉不太合适
有没有大佬给我修改指点一番
@zqq200808 大佬在https://www.52pojie.cn/forum.php?mod=viewthread&tid=749044
回复的华为交换机脚本我拷贝下来 运行时会出错 不知道是什么问题。还请指点一番
[Visual Basic] 纯文本查看 复制代码 #$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.Send "display clock" & chr(13)
crt.Screen.Send "" & chr(32)
crt.Screen.Send "" & chr(32)
crt.Screen.WaitForString ">"
crt.Screen.Send "display device" & chr(13)
crt.Screen.Send "" & chr(32)
crt.Screen.Send "" & chr(32)
crt.Screen.WaitForString ">"
crt.Screen.Send "display device slot 0" & chr(13)
crt.Screen.Send "" & chr(32)
crt.Screen.Send "" & chr(32)
crt.Screen.WaitForString ">"
crt.Screen.Send " display esn" & chr(13)
crt.Screen.Send "" & chr(32)
crt.Screen.WaitForString ">"
End Sub |