conemu-inside icon indicating copy to clipboard operation
conemu-inside copied to clipboard

Add a method to get console text

Open AndrewBragdon opened this issue 7 years ago • 4 comments

This is a fantastic project!

Could you add a method that returns the current text of the console output? I would love to be able to query these items:

  • Each line of text in the current console view
  • What color each character is
  • Position of cursor / state of cursor
  • Scroll position (read) / Change scroll position (write)

This would then truly be the most powerful console library there is. Right now it looks like the only way to achieve this is to directly modify ConEmu, but it would be great if the C# wrapper could do this.

AndrewBragdon avatar Apr 29 '17 07:04 AndrewBragdon

You may try GuiMacro. Acquiring of the contents may be done by Copy function, you may use temp file instead of clipboard.

Maximus5 avatar Apr 29 '17 10:04 Maximus5

Thanks for the tip. This is cool, the only problem is that if I want to call this very frequently it will be slow. Would there possibly be a way to copy it to a named pipe?

AndrewBragdon avatar Apr 29 '17 18:04 AndrewBragdon

You may give pipe a try. It may be working.

Maximus5 avatar Apr 29 '17 18:04 Maximus5

Oh wow, that would be awesome. Will give that a try

AndrewBragdon avatar Apr 29 '17 18:04 AndrewBragdon