For Programmers: Free Programming Magazines  


Home > Archive > C# > April 2006 > Send Enter Key to the CONSOLE









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Send Enter Key to the CONSOLE
ME

2006-04-25, 7:09 pm

I can not for the life of me figure out how to send the ENTER key to a
RUNNING instance of the Console. I do not have access to the startup of the
console in this case. I have found a way to attach to the console using
AttachConsole (Kernal32). Now I need to send the Enter key to it. I can
get the cursor to move down one line, but I can not seem to send an Enter so
the command prompt process the command I write.

Can some help? I appear to be stupid.

Thanks,

Matt


Quina

2006-04-26, 7:03 pm

Hi, I'm not sure what you whant but I think what you meen is the
equivalent to ASCII char #13. Try something like this:

(=2E..)
string myString =3D "Hello" + Environment.NewLine + "World!";
(=2E..)

It should look like this:

Hello
World

Jo=E3o Carias
(Quina)

Quina

2006-04-26, 7:03 pm

Hi, I'm not sure what you whant but I think what you meen is the
equivalent to ASCII char #13. Try something like this:

(=2E..)
string myString =3D "Hello" + Environment.NewLine + "World!";
(=2E..)

It should look like this:

Hello
World

Jo=E3o Carias
(Quina)

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com