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 05-13-2018, 03:09 AM
elsa elsa is offline
Registered User
 
Join Date: May 2018
Posts: 1
Get() function question

I want get dedicate output to excel/text file from below output.
# $language = "VBScript"
# $interface = "1.0"

' This script demonstrates how to open a text file and read it line by
' line to a server.

' Constants used by OpenTextFile()
'
Const ForReading = 1
Const ForWriting = 2

Sub Main

Dim fso, file, str
Set fso = CreateObject("Scripting.FileSystemObject")

' Note: A runtime exception will be generated if 'input.txt' doesn't exist.
'
Set file = fso.OpenTextFile("c:\temp\input.txt", ForReading, False)

crt.Screen.Synchronous = True

Do While file.AtEndOfStream <> True

str = file.Readline

' Send the line with an appended CR
'
crt.Screen.Send str & Chr(13)

' Wait for my prompt before sending the next line
'
crt.Screen.WaitForString "HACUDB1 SC_2_2#"
Loop

crt.Screen.Synchronous = False

End Sub
# $language = "VBScript"
# $interface = "1.0"

Sub Main

Below is input file content:
tipc-config -n
tipc-config -n
tipc-config -n

For example i want get data from 7n 1 7n 11, how to write the script, thank you very much
Reply With Quote
  #2  
Old 05-14-2018, 07:42 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,396
Hello elsa,

Quote:
For example i want get data from 7n 1 7n 11, how to write the script, thank you very much
I do not understand what you are trying to accomplish. Please elaborate.

However, if your objective involves working with Excel, you might find a useful example script here.
__________________
Thanks,
--Brenda

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

Tags
get()


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:39 PM.