Solved

Faking Keyboard Input to a CMD window

Posted on 1997-03-06
2
1,256 Views
Last Modified: 2013-12-03
Does anyone know how to send keystrokes to a CMD windows under Win32 (Windows NT).  I need to be able to send keystrokes to a legacy MSDOS application from another Win32 application, and I also need to be able to examine the screen buffer output from the DOS App.

The Dos app does direct writes to the screen.

Thanks.
0
Comment
Question by:ptan
2 Comments
 

Accepted Solution

by:
Irene012397 earned 35 total points
Comment Utility
If you don't mind your actions to be widely visible, place the keys on clipboard and send alt-space, e, p.

To read the screen, send alt-space, e, m, a lot of shift-arrows and alt-space, e, c.

I think there is no other easy way to communicate with normal DOS windows.
0
 

Expert Comment

by:lightningstalker
Comment Utility
Most times you can do this using redirection like this:

dosapp < keyboardinputfile > output
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

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 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

11 Experts available now in Live!

Get 1:1 Help Now