By registering with us, you'll be able to discuss, share and exchange private messages with other members of our community.

SignUp Now!

Limit text output to specific area of the Console Window

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.
This may or may not do what you want;


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.