Would like visual Basic app to control a javascript app by passing command line commands
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

Software/Hardware used:
ASKED: May 29, 2007  6:28 PM
UPDATED: May 30, 2007  12:32 PM

Answer Wiki:
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.
Last Wiki Answer Submitted:  May 30, 2007  12:32 pm  by  CharlesJC   0 pts.
All Answer Wiki Contributors:  CharlesJC   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _