[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to send <Enter> key to DOS windows?

Posted on 1998-11-17
2
Medium Priority
?
805 Views
Last Modified: 2012-08-13
:)
I have a dos program executed from VB (using Shell )and the DOS prog will ask for a key to be entered before continuing. How can I send <Enter> key to the DOS program from VB?
Something like:

Shell ("myprog "),..
-- send enter key to myprog window ---???

Sorry but I am out of points!! Thanks a million.
0
Comment
Question by:Haho2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
vikiing earned 0 total points
ID: 1445343
Try to put the program into a .BAT file, in a sentence like this:

   ECHO.|your-program

The "ECHO." command (note the period stuck to letter "O") generates simply an ENTER, which is piped to "your-program". If "your-program" accepts redirected input, then it will work (of course, your VB program must SHELL to the .BAT file).
0
 
LVL 3

Expert Comment

by:vikiing
ID: 1445344
PS: note that the vertical bar which appears as joining ECHO to your-program, is the vertical bar that often appears above "\"; you can see what exactly is just by typing (at DOS level) Alt-124


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

656 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