Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2005, 04:33 PM
firfir firfir is offline
Registered User
 
Join Date: Nov 2005
Posts: 4
ignore ---(more)--- line at the end

thanks for this great software...

i have a script running with secure crt 5.0...

this script works then lists interfaces and write to a log file.
but there is problem
when script works I see a ---(more)--- line at the end
how can I ignore this line
because each time I have to hit space to see the next page

I looked @ FAQ and changed some setting on secure crt but did not solve

thans for support !!!

firat
Reply With Quote
  #2  
Old 11-07-2005, 06:58 PM
MrC MrC is offline
Registered User
 
Join Date: Mar 2004
Posts: 216
This is not a securecrt issue, it is a pager issue. Your script is using the more(1) pager program. Use cat(1) instead of you don't want to page through one screen at a time.
Reply With Quote
  #3  
Old 11-07-2005, 07:47 PM
firfir firfir is offline
Registered User
 
Join Date: Nov 2005
Posts: 4
is there any article to read about cat(1) ? I looked over google... But if you advise some... it would be great..

thanks...
Reply With Quote
  #4  
Old 11-07-2005, 09:11 PM
MrC MrC is offline
Registered User
 
Join Date: Mar 2004
Posts: 216
if you're on a unix/linux system:

man cat

Use the "type" command if you're on a windows command line.

help type

will give you more info.
Reply With Quote
  #5  
Old 11-08-2005, 12:31 AM
firfir firfir is offline
Registered User
 
Join Date: Nov 2005
Posts: 4
mine windows ... thanks i will look for it
Reply With Quote
  #6  
Old 11-08-2005, 10:17 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,039
If the remote is Windows, and your shell is a DOS shell, try using the 'type' command instead (e.g. 'type c:\myfile.txt').

If the interface listing is generated by a program as opposed to simply viewing a file, an alternative solution would be to automatically "press" the spacebar within your script each time the "--(more)--" string is found. Consider the following example:

Code:
#$language = "VBScript"
#$interface = "1.0"

Sub Main()
    crt.Screen.Synchronous = true

    ' turn on logging
    crt.Session.Log true

    ' Generate data that only comes one screen-full at a
    ' time
    crt.Screen.Send "more 480LineFile.txt" & vbcr

    ' Wait for either the shell prompt to appear or the
    ' "--More--" prompt to appear. If the shell prompt
    ' appears, we know that there isn't any more
    ' "--More--"'s to worry about, so we'll exit the loop.
    Do
        nStringIndex = crt.Screen.WaitForStrings("]$", "--More--", 30)
        Select Case nStringIndex
            Case 0
                ' Timed out after 30 seconds waiting for either string.
                ' Since we expect a screen-full of data to come within
                ' 30 seconds, if nothing appears we'll just exit the
                ' loop
                exit do

            Case 1
                ' Shell prompt was found... exit 'do' loop
                exit do

            Case 2
                ' We found a "--More--" prompt.
                ' szTxt = crt.Screen.Get(crt.Screen.Rows,0,crt.Screen.Rows,7)
                ' If szString = "--More--" then
                    crt.Screen.Send " "
                ' End If
        End Select
    Loop

    ' Turn off logging
    crt.Session.Log false

    crt.Session.Disconnect
    crt.Quit

End Sub
Does this information help?

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
  #7  
Old 11-08-2005, 04:40 PM
firfir firfir is offline
Registered User
 
Join Date: Nov 2005
Posts: 4
Jake Devenport,

thanks for the brilliant code

it worked super.

i am very satisfied with your solution...

many many thanks...

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 03:51 PM.