|Home||What's New||Products||Download||Purchase||Support||About Us||Contact||Forums|
# $language = "VBScript"
# $interface = "1.0"
' This script demonstrates how ActiveX scripting can be used to
' interact with CRT and manipulate other programs such as Microsoft Excel
' through an OLE automation interface. This script creates an instance of Excel,
' then it sends a command to a remote server (assuming we're already
' connected). It reads the output, parses it and writes out some of the
' data to an Excel spreadsheet and saves it. This script also demonstrates
' how the WaitForStrings function can be used to wait for more than one
' output string.
'crt.Screen.IgnoreCase = True
crt.screen.synchronous = true
' Create an Excel workbook/worksheet
Dim app, wb, ws
Set app = CreateObject("Excel.Application")
Set wb = app.Workbooks.Add
Set ws = wb.Worksheets(1)
' Send the initial command to run and wait for the first linefeed
crt.Screen.Send("dis mac-address dynamic vlan 3000" & Chr(10) )
do While true
if (crt.Screen.WaitForString("More",3) = true ) then
crt.screen.synchronous = false
vbs untils stopping do while,please help me,ths!
There is an "exit do" statement within the Do While, so that could explain it appearing to stop. Based on the output you are receiving, do you expect the "if side" to execute, or the "else side"?
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Display Modes||Rate This Thread|