Solved

Batch Hyper Terminal

Posted on 2004-09-13
3
1,215 Views
Last Modified: 2012-05-05
Hello all,

I would like to implement some sort of auto updating time batch file for our phone system. The phone system software uses hyperterminal as an interface to poll the external database. All i really need to know is how i go about passing the info from say a batch or text file to hyperterminal, as i know the commands i need to get job done.

Can anyone Help

Best Regards

IT
0
Comment
Question by:SynsealIT
3 Comments
 
LVL 5

Accepted Solution

by:
kemp_a earned 50 total points
ID: 12186774
Since Hyperterminal doesn't have a scripting language live VB Script then its difficult, could you use a scriptable Telnet client instead? I found one a few months back but forgot what it was called.

Alternatively, you could use VB Script to drive Hyperterminal somethin like the following:

'VBScript Testing Script (c) kemp_a
Const iNormalFocus = 1

Dim arrayRecNum()

' Tracking Script Progress
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 1000
objExplorer.Height = 7500
objExplorer.Left = 25
objExplorer.Top = 25
objExplorer.Visible = 1
' Wait for application to be ready!!!
Do While (objExplorer.Busy)
 Wscript.Sleep 100
Loop

Set objDocument = objExplorer.Document
objDocument.Open
objDocument.Writeln "<html><head><title>Activ Foundation Test Scripts</title></head>"
objDocument.Writeln "<body bgcolor='white'>"
objDocument.Writeln "Connecting to Database <p>"

objDocument.Writeln "This might take several minutes to complete.<p>"
...

objDocument.Writeln "Starting WSH.Shell object<p>"
Set objShell = WScript.CreateObject("WScript.Shell")
objDocument.Writeln "Starting Hosted Application<p>"
objShell.Run """C:\Program Files\Windows NT\hypertrm.exe""", iNormalFocus
objDocument.Writeln "Started " & Wscript.Application & " at " & Time & "<p>"
Wscript.Sleep 1500

objShell.AppActivate "Hyperterminal"
Wscript.Sleep 1500
' Send whatever keys you want to the Hyperterminal window
            objShell.SendKeys "%G"
            Wscript.Sleep 150
            objShell.SendKeys "A"
            Wscript.Sleep 150
            objShell.SendKeys "B"
            Wscript.Sleep 150
            objShell.SendKeys "C"
            Wscript.Sleep 150
            objShell.SendKeys "{TAB}"
            Wscript.Sleep 100
                      objShell.SendKeys "{ENTER}",75
objDocument.Writeln "</table>"

objDocument.Writeln "Finished with selected records.<p>"

objDocument.Writeln "Database Closed."
objDocument.Writeln "</body></HTML>"
Wscript.Sleep 3000
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question