Solved

Batch Hyper Terminal

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
scores100 challenge 3 82
wordsWithout 49 77
VBA color chart bars 12 64
oracle query help 18 74
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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 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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now