Board index » delphi » Sending Keys to DOS app.

Sending Keys to DOS app.

Hi,
I really hope someone can help!  I've looked everywhere I can think of,
and tried everything I know.  I'm running a DOS app via a .PIF file and
I need to send it a single key press.  How do I do this?  I'm using
Delphi 1.02, running on Win 3.1.

I would also like to know if it is possible to capture the output from
my DOS program without sending it to an intermediate file, but this is
not crucial.

Any help, or pointers would be GREATLY appreciated!

TIA

Neil Manson                     (011) 716-2535
Water Systems Research Group, Civil Eng., Wits
N-MAN...@CIVEN.CIVIL.WITS.AC.ZA

 

Re:Sending Keys to DOS app.


Looks like I'm in charge here to answer THAT question.
I should say, though, that you definitely haven't tried EVERYTHING
(sounding quite desperate), since the answer was given just a few
day ago in this newsgroup. And I quote:

(Is there a Sendkeys command like in VB?)

No, unfortunately there isn't. But there are a few substitutes. I know two
of them:

1.  The solution of our beloved Sir Steve Teixeira, which he revealed
in his most famous book. He uses a DLL he has written himself, using
JournalPlayback and other fancy stuff (SENDKEYS.DLL). Full source
code is given in his book (...)

2.  A Japanes guy, Makoto Muramatsu, too, has written a SENDKEYS.DLL,
using a different approach, Unfortunately it didn't work for me, when I tried
to send some keystrokes to a DOS window. I have that DLL and will send
it to you, if you want me to (be sure to specify your mailing program).

Good luck!

Dietrich Delekat

Re:Sending Keys to DOS app.


Quote
n-man...@civen.civil.wits.ac.za (Neil Manson) wrote:
>Hi,
>I really hope someone can help!  I've looked everywhere I can think of,
>and tried everything I know.  I'm running a DOS app via a .PIF file and
>I need to send it a single key press.  How do I do this?  I'm using
>Delphi 1.02, running on Win 3.1.
>I would also like to know if it is possible to capture the output from
>my DOS program without sending it to an intermediate file, but this is
>not crucial.
>Any help, or pointers would be GREATLY appreciated!
>TIA

If you have the source for the DOS program, why not send the key info
via the command line? Otherwise, out of curiosity, what is the key
you want to send?

Regards,
Bengt Richter

Other Threads