Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-11-2015, 08:55 AM
766404776 766404776 is offline
Registered User
 
Join Date: Apr 2015
Posts: 4
Handle --more-- for screen scrolling paused -noobie

I am sure this is in the forum somewhere but, can't find it.

The length of the response from the appliance is causing a ---more-- scroll pause. Want to look for that and then press the space bar each time until it stops. Not all commands will cause this to occur so need to handle that as well.

Much appreciated
Reply With Quote
  #2  
Old 05-11-2015, 09:05 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi 766404776,

Thanks for the post. While the question has been asked and answered, it won't hurt to answer it again.

The scripting manual that we have illustrates how to accomplish your goal. You can find the scripting manual at the following location:
http://www.vandyke.com/support/tips/...ing/index.html
The example begins with an explanation near the bottom of page 50 under the heading of Using MatchIndex to Determine Which String ReadString() Detected.
An alternative is to just turn off paging temporarily while the script is running.

Does this information help you accomplish your goal?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 05-11-2015, 10:50 AM
766404776 766404776 is offline
Registered User
 
Join Date: Apr 2015
Posts: 4
90% there

Almost working. I have 14 commands I am running and capturing output. For 2 of the commands it will pause on the --More-- it encounters. It does not matter where in the order of the commands that it is place it will always stop for the --More--. There are other commands that have single or multiple --More-- pauses and they work fine. Checked the mention regarding the replace with the Cisco Pix and no luck there.

Thinking it is showing something different but, not sure where to debug. Any assistance would be appreciated.
Reply With Quote
  #4  
Old 05-11-2015, 11:21 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Thanks for the update.

You could use MessageBox() method of the Dialog object to find out what is in strResult.

For example, you could modify the script example to include the bolded line as follows:
strResult = crt.Screen.ReadString("<--- More --->", "pixfirewall#")
crt.Dialog.MessageBox "strResult contains: " & vbcrlf & vbcrlf & strResult
' Append the results we've got so far to the complete
' results that are being accumulated.
strCompleteOutput = strCompleteOutput & strResult
Does this help you determine what problem you are encountering?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 05-11-2015, 01:09 PM
766404776 766404776 is offline
Registered User
 
Join Date: Apr 2015
Posts: 4
Not there yet

I did try with the messagebox but, the results overfill the box and I can't scroll within it.

If I try with this command as the only one I get the prompt, yet with other commands that are as long in the results it does not prompt..
Reply With Quote
  #6  
Old 05-11-2015, 01:22 PM
766404776 766404776 is offline
Registered User
 
Join Date: Apr 2015
Posts: 4
fixed it.

Had this line

strResult = crt.Screen.ReadString("--More--",">")

Changed it to see the actual prompt versus the initial subset I was looking for

strResult = crt.Screen.ReadString("--More--",strPrompt)

example session prompt was testlab> and was just looking for the >

Much appreciate the quick responses.
Reply With Quote
  #7  
Old 05-11-2015, 03:04 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi,

That is good news.

For future reference, another troubleshooting tip is to cancel a script that doesn't seem to be doing what you want. Then check the line of the script where it cancelled to see what might be happening.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730

Last edited by rtb; 05-11-2015 at 03:05 PM. Reason: Fixed typo.
Reply With Quote
Reply

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 05:59 AM.