View Single Post
  #3  
Old 06-08-2016, 05:46 PM
yuvi yuvi is offline
Registered User
 
Join Date: Jun 2016
Posts: 2
Thanks for the reply rtb!

I tried that already, gave it another go, still I am unable to read all the data output of my command "show port"

All this does is matching the index to the string where you need a space, gives a space and displays the whole data on to the screen.

But, still unable to read the whole data.

Here is what I did, (FYI, I am not working with CISCO, its Bastian, if that helps

Quote:

crt.Screen.Synchronous = True

crt.screen.send "show port " & vport & vbcr

crt.Screen.WaitForString vbcr

strCompleteOutput = ""

Do


strResult = crt.Screen.ReadString("* indicates that the corresponding row element may have been truncated.", "Symbol Errors")



strCompleteOutput = strCompleteOutput & strResult

If crt.Screen.MatchIndex = 1 Then crt.Screen.Send " "

If crt.Screen.MatchIndex = 2 Then Exit Do
Loop

strCompleteOutput = Replace(strCompleteOutput, _
vblf & vbcr & vbcr & " " & vbcr, vblf & vbcr)

MsgBox strCompleteOutput

Still it just reads the output till before "* indicates that the corresponding row element may have been truncated"

I want he output till "symbol Errors"

which is not happening.
Reply With Quote