December 22nd, 2013, 08:42 PM
Capturing Command Output using ReadString() Method - VBScript
i am trying to capture some commands ouput using the ReadString() method of the Screen object in the CRT but it always returns an empty string. not sure why, here is my code :
dim row, Output, Lastrow, IntArr, i
row = "ge-7/0/0,ge-7/1/0"
IntArr = Split(row , ",")
Lastrow = "RouterHostname>"
for i = LBound(IntArr) to UBound(IntArr)
crt.Screen.Send ("show interfaces " & IntArr(i) & " extensive | no-more" & VbCr)
Output = crt.Screen.ReadString(Lastrow)
i dont get an error or anything, its just the Msgbox shows nothing, just an empty msgbox with no output displayed, any idea why ?
your help is appreciated.
Last edited by mizo1510; December 22nd, 2013 at 08:49 PM.
Reason: Fixing Typos