Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-13-2009, 04:22 AM
samoki samoki is offline
Registered User
 
Join Date: Jun 2006
Posts: 24
How can I send space key for next page

Hi!I have a question:
Some router commands will give a very long output.Telnet session will output a page and when I press space key,it will go on to next page.I want to do this automatically,I use command
crt.screen.send chr(32)
or
crt.screen.send " "
,but it do not work both.
How can I solve it?
I use SecureCRT 5.1
Reply With Quote
  #2  
Old 08-13-2009, 10:03 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,635
Hello samoki,

You can accomplish sending a space to the remote using either of the methods below:
Code:
crt.screen.send chr(32) 
crt.screen.send " "
How does your script recognize when a page of output is complete?

What are your current results? (ie: script errors, waiting for input)
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 08-13-2009, 06:41 PM
samoki samoki is offline
Registered User
 
Join Date: Jun 2006
Posts: 24
I use sentence:
Code:
"crt.screen.WaitForString(RouterID &"#",2)"
in a "Do Until...Loop" to judge.If not appear,script will use
Code:
crt.screen.send chr(32) 
or 
crt.screen.send " "
to make output going on.
What I mean is:
Script do not wait output break,if condition is not appear in 2 second,script will give a space to make output going on.

Last edited by samoki; 08-13-2009 at 06:51 PM.
Reply With Quote
  #4  
Old 08-14-2009, 08:39 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,635
Hi samoki,

Thank you for the clarification.

Let me know how it works.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 08-19-2009, 03:42 AM
samoki samoki is offline
Registered User
 
Join Date: Jun 2006
Posts: 24
Hi bgagnon,
In fact,it can not work well.
I use these codes:
Code:
Do Untile crt.screen.waitforstring("router#",5)
  crt.screen.send Chr(32)
Loop
but,when system appear '-- More --',it will appear 'router#' at same time,and the loop will end at that time.
I want know in 'vt100' mode,what break character will appear for program to recognize it's time to give a space character?
Thank you.
Reply With Quote
  #6  
Old 08-19-2009, 10:42 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,635
Hi samoki,

Does your script follow the example found in Chapter 4 of the scripting manual available from our website?

Specifically, the information found in:
Section 4.3: Using MatchIndex to Determine Which String ReadString() Detected

Setting crt.Screen.Synchronous = True is necessary to avoid missing data sent from the remote while other code within the script is being executed.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply


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 11:18 AM.