Pause Console Application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maylortaylor
    New Member
    • Nov 2012
    • 72

    Pause Console Application

    So, i have a console application that runs perfectly well but it runs too fast to read any of the information on the screen. So what i'm trying to do is one of two things...

    A) create a function that i can call with a key stroke (such as "spacebar") . The function would be something simple like "console.readli ne()" just so the user can willingly pause the console app.

    or

    B) a function that is called every 50 lines or so that esstentially would be "console.readli ne()". Just so the user can scroll up and review the information. The problem with this is that I would want the program to resume after a few seconds (15).

    Any help?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You can't do A unless you're going to do multithreading. You can do B though. Just use a variable to keep a count and throw in a readline when a certain number of lines has been outputted.

    Comment

    Working...