EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

TWAPI: How to send text to the console of another process? (Windows)

Started by Helmut Giese November 9, 2023
Hello out there,
I have a program that refuses to be handled by a pipe:
- either it starts as a pure GUI app or
- it opens a console of its own and accepts input only from there.

So I thought of using TWAPI to feeding it my input  but all the
functions in the 'Console' section seem to handle the console of the
calling process - at least none of the functions there take a HANDLE
or HWND or similar parameter.

The TWAPI documentation doesn't offer anything (obvious) how to handle
this situation hence my question here: Is there a way to send input to
(and maybe even to get output from) the console of a different
process?

Any help will be greatly appreciated
Helmut
On 09/11/2023 22:24, Helmut Giese wrote:
> Hello out there, > I have a program that refuses to be handled by a pipe: > - either it starts as a pure GUI app or > - it opens a console of its own and accepts input only from there. > > So I thought of using TWAPI to feeding it my input but all the > functions in the 'Console' section seem to handle the console of the > calling process - at least none of the functions there take a HANDLE > or HWND or similar parameter. > > The TWAPI documentation doesn't offer anything (obvious) how to handle > this situation hence my question here: Is there a way to send input to > (and maybe even to get output from) the console of a different > process? > > Any help will be greatly appreciated > Helmut
You might be /very/ lucky and find someone here who can help you, but you are looking in the wrong kind of forum. This is a Usenet group for embedded development - hardware and software for electronics, primarily with small microcontrollers. You are much more likely to get help from a Windows programming Usenet group, discussion forum, website, etc. It is rare in the Windows world for software to work well with pipes, or even to work well with any other programs - Windows programs are supposed to stand alone, not be building blocks in combination with other programs. Maybe you can find some software designed for automated testing of Windows programs, where you can script sets of keypresses and mouse clicks, in order to control the program?
Hello David,
>You might be /very/ lucky and find someone here who can help you, but >you are looking in the wrong kind of forum. This is a Usenet group for >embedded development - hardware and software for electronics, primarily >with small microcontrollers. You are much more likely to get help from >a Windows programming Usenet group, discussion forum, website, etc. > >It is rare in the Windows world for software to work well with pipes, or >even to work well with any other programs - Windows programs are >supposed to stand alone, not be building blocks in combination with >other programs. > >Maybe you can find some software designed for automated testing of >Windows programs, where you can script sets of keypresses and mouse >clicks, in order to control the program?
you are of course right: this is the wrong forum. It was a mistake - I intended to post to comp.lang.tcl. Evidently I shouldn't be posting that late at night ... Thanks for answering at all Helmut

The 2024 Embedded Online Conference