Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting


Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 06-04-2016, 02:08 AM
mehbooburrehman mehbooburrehman is offline
Registered User
Join Date: Jun 2016
Posts: 2
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" & vbCr

crt.Screen.Synchronous = False


End Sub
Reply With Quote

command delay , vbs , wait

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 02:30 AM.