in reply to (Windows) insert text at cursor in non-owned window

In the spirit of TMTOWTDI, you may also wish to look at Win32::Clipboard and kin. I have assembled Super Search results below.

There is also a very nice little utility called, predictably, "Clipboard" which allows you to capture output from a DOS command prompt and copy it to the Windows Clipboard. The article may be found here: Print From Any Console Application, by Bill Wagner (a free, AFAIK, registration is required). If you go to Visual Studio Magazine and type vsep030228cs into the "Locator+ Code" field, you should be able to download the C# source as a .zip file. Usage is as follows:


Prompt> dir | clipboard -c

..copies to the clipboard.

Prompt> dir | clipboard -p

.. Prints the output

Prompt> dir | clipboard -c -p

Copies to the clipboard, and prints it.

HTH,

planetscape

Replies are listed 'Best First'.
Re^2: (Windows) insert text at cursor in non-owned window
by Anonymous Monk on Aug 18, 2006 at 14:18 UTC

    That doesn't help, it does not quite match my requirement. I have no generalised way to paste stuff into the application. I cannot store unicode text on the clipboard. Quote Win32::Clipboard

    The following formats are not recognized by Win32::Clipboard {...}
    CF_UNICODETEXT 13