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
  #1  
Old 06-08-2016, 01:22 AM
yuvi yuvi is offline
Registered User
 
Join Date: Jun 2016
Posts: 2
Grabbing a long list of data output from screen

Hi guys,

So am trying to grab a whole lot of output of a command from the command line.

I am using crt.screen.send to punch the command on to the CLI and using a temporary text file to read each line.

Here is what am doing,

Quote:

crt.screen.send "show port " & vPort &vbcrlf &vbcrlf

crt.screen.send vbcrlf

crt.Screen.WaitForString vbcrlf, 10

crt.screen.send "#" &vbcrlf




crt.Screen.WaitForString vbcr, 10

vPortFetchLine = crt.Screen.ReadString("#")
Then I am using a writeobj to write it on to a temporary text file and then read the same from it.

The problem with this is that I can't read the lines after certain lines which in real time would require me to hit a spacebar. I am using vbcrlf to display all the output on the screen but am only able to grab the lines or output before I am giving the command "vbcrlf"


for instance if have several lines as output,

line1
line2
.
.
.
.
line30
Press any key to continue (Q to quit)
This is where I am required to hit spacebar in real time when working with script.

I gave several vbcrlf to overcome the challenge of hitting spacebar in the script.

What am unable to do though is not able to grab the entire output all am getting is till Press any key to continue (Q to quit), although I can literally see the rest of the output being displayed on the screen.

So it should be something like this (assuming am getting 60 lines on the screen),

Quote:

line1
line2
.
.
.
.
line60
Instead all am getting in my textfile is,

Quote:

line1
line2
.
.
.
.
line30
Press any key to continue (Q to quit)

I may sound crazy, I hope I conveyed my point. Please correct my mistake and help me read all the output of this particular command.

Thanks in advance!

Yuvi
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 07:03 AM.