Solved

Batch Hyper Terminal

Posted on 2004-09-13
3
1,220 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

713 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