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

    From Helmut Giese@hgiese@ratiosoft.com to comp.arch.embedded on Thu Nov 9 22:24:17 2023
    From Newsgroup: comp.arch.embedded

    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
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From David Brown@david.brown@hesbynett.no to comp.arch.embedded on Fri Nov 10 09:49:28 2023
    From Newsgroup: comp.arch.embedded

    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?

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Helmut Giese@hgiese@ratiosoft.com to comp.arch.embedded on Fri Nov 10 11:56:35 2023
    From Newsgroup: comp.arch.embedded

    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
    --- Synchronet 3.20a-Linux NewsLink 1.114