#1
|
|||
|
|||
Make Secure CRT script wait till command finished
When I use VBS to run command on a device my script keeps running through commands until the end without waiting for previous device command to finish.
for example in the following script. The commands on the router take a few seconds to execute but the last command "msgbox("done") is executed immediately. Is there any way to make the script wait till the commands are executed. # $language = "VBScript" # $interface = "1.0" Sub Main crt.Screen.Synchronous = True crt.Session.Connect "/TELNET x.x.x.x 23" crt.Screen.WaitForString "sername:" crt.Screen.Send "xxx" & vbCr crt.Screen.WaitForString "assword:" crt.Screen.Send "sl@x" & vbCr crt.Screen.Send "show ip int br" & vbCr crt.Screen.Send "show cdp neighbors" &vbCr crt.Screen.Send "ping 8.8.8.8" & vbCr crt.Screen.Synchronous = False msgbox("Done") End Sub |
Tags |
command delay , vbs , wait |
Thread Tools | |
Display Modes | Rate This Thread |
|
|