Would like visual Basic app to control a javascript app by passing command line commands

Tags:
Development
Management
Microsoft Windows
OS
Security
Servers
SQL Server
Visual Basic
Hi, I have a javascript application that I use to debug hardware at my job, and its user interface is a command line in a (WindowsXP) dos window. This is kind of crude (e.g. to read a memory location you have to type something like "gfcb.readx(0xcf001234)") so I would very much like to design a visual Basic app that would sit "on top" of the javascript app - interpret mouse clicks, pass commands to the javascript app, and display the output of the javascript app. I can't modify the javascript app itself, so the VB app would have to mimic a user typing away in a dos window. Can a VB program communicate with an existing command-line application in this way? Sorry if this is a dumb question... I'm just a hardware guy... Thanks! Chris

Answer Wiki

Thanks. We'll let you know when a new response is added.

rennysoncemann,

You can launch the command prompt using Shell function and send key strokes to it using the Sendkeys function. You will need to set the focus of the command prompt so SendKeys will work.

You will need to do all of you processing without user interaction or you will have to figure out how to give the command prompt focus again, possibly using the AppActivate function.

Hope this helps.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following