Is there any way to copy all text from console window?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oscar2
    New Member
    • May 2010
    • 9

    #1

    Is there any way to copy all text from console window?

    Hello all,
    I am writing a console program in vb.net 2010 .net 4.0. Through out the program there are many lines of info. presented to the user in the console window. I was wondering if there is a way to copy all those lines from the code, cause I want to save the text as a log to the operations carried out.

    Thanks in advance.
    Last edited by oscar2; Jun 26 '10, 05:06 PM. Reason: misspelling!
  • oscar2
    New Member
    • May 2010
    • 9

    #2
    Originally posted by oscar2
    Hello all,
    I am writing a console program in vb.net 2010 .net 4.0. Through out the program there are many lines of info. presented to the user in the console window. I was wondering if there is a way to copy all those lines from the code, cause I want to save the text as a log to the operations carried out.

    Thanks in advance.
    Come on guys/girls any ideas? :) Is what I'm asking for impossible? If so please tell me so that I gave up :)
    Thanks again!

    Comment

    • ThatThatGuy
      Recognized Expert Contributor
      • Jul 2009
      • 453

      #3
      Originally posted by oscar2
      Hello all,
      I am writing a console program in vb.net 2010 .net 4.0. Through out the program there are many lines of info. presented to the user in the console window. I was wondering if there is a way to copy all those lines from the code, cause I want to save the text as a log to the operations carried out.

      Thanks in advance.
      It's a little simple and a weird question as to why would you try to read the console text from console output window...

      What you could have easily done is keep a track of all the text that's written to console.. into a string...
      and then log it..

      But if you want it that way... so here's I've found a workaround

      Comment

      • oscar2
        New Member
        • May 2010
        • 9

        #4
        I can easily keep track of all text written in the console window but it would be much easier to just copy everything at the end and dump it in a log file.. Anyway.. thanks for the help.

        Comment

        Working...