1 Rookie
•
23 Posts
0
1803
June 8th, 2020 17:00
any secureCRT vba script issue?
when i connect to switches such as s3048, s3148, s4048 with console,
is there any problem if I use vba script on secureCRT to check some 'show' commands?
such as device's cpu 100% issue and so on.
below is the vba script example.
#$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 "show run | grep hostname" & chr(13)
dd = crt.Screen.CurrentRow
dd2 = crt.Screen.get(dd,1,dd,50)
dim result
host_name = trim(dd2)
result = crt.Screen.WaitForString (host_name)
'crt.Screen.Send host_name & chr(13)
crt.Sleep 100
crt.Screen.Send "show clock" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "ter monitor" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show int desc | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show ip int bri | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show inter | grep CRC | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send " show ip route su | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show ip ospf nei | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show ip ospf 1 nei | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show ip ospf 2 nei | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show ip bgp su | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show arp su | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send " show proce cpu su | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show proc cpu mana | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show proc cpu mana | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show mem | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show ip ro 0.0.0.0/0 | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show ver | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show run | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show int | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show env all | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show syst b | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send "show logg | no" & chr(13)
result = crt.Screen.WaitForString (host_name)
crt.Screen.Send host_name & chr(13)
End Sub



DELL-Josh Cr
Moderator
•
9.4K Posts
0
June 10th, 2020 06:00
I wasn’t able to find anything, but maybe the community has more information.
DELL-Josh Cr
Moderator
•
9.4K Posts
0
June 9th, 2020 10:00
Hi,
We have do not support scripting but it should work.
js11o9
1 Rookie
•
23 Posts
0
June 9th, 2020 18:00
thanks. but what I want is known issue with the switch by using script on SecureCRT.
If there is no such problem, thanks