1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Limit text output to specific area of the Console Window

Discussion in 'T&T - Scripting' started by Aeries, Nov 17, 2011.

  1. Aeries

    Joined:
    Nov 9, 2011
    Messages:
    5
    Likes Received:
    0
    I have often been in need of a "Viewport" command which could limit all text output in the Shell (TC or TCC) to a certain area.

    For instance, I would print a menu at the top of the console window and let all output of commands be displayed in the lower lines of the console window only.

    Can this be done with TCC/TC? I remember having a shell many years ago, when using MS-DOS, called viewport. It would do the trick.

    viewport 0 0 79 10 -- this would allow any shell command to output text only between (0,0) and (79,10), just like having a window being 80 chars wide and 10 lines tall.

    Often I could resolve it by redirecting the output to a file, but not all programs allows output to be redirected and sometimes it can be useful to show the user that a program is working by displaying the output, but limiting it to a certain area.
     
  2. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    638
    Likes Received:
    6
    This may or may not do what you want;

    http://jpsoft.com/forums/open-forum/3179-console-select.html

    While I use it to select a line from a file, you can also use it to display the contents of a file, for example;

    con_select.exe %thefile 5 7 20 180

    Me thinks, though, that you are looking for something similar to the old QuickBASIC VIEW PRINT statement, that sets the boundaries of the screen text viewport.

    Joe
     

Share This Page