Hallo Tobias,

Tobias Peters <tpeters / uni-oldenburg.de> wrote:


>What happens when you try system("cls") ?
>
>Other options: Scroll the current screen content away:
>MAX_DOSWINDOW_LINES = 50
>puts ("\n" * (MAX_DOSWINDOW_LINES * 2 - 1))
>
>When searching for `console clear screen' at google, the first hit is an
>article from microsoft about clearing the console screen. It contains,
>apart from the system("cls") tip, the source code for a C function to
>clear the screen. If all else fails, you could still create a small ruby
>extension that contains this code.
>
>Or maybe you want to use ncurses? I think it can cope with dos boxes, too.
>http://ncurses-ruby.berlios.de/ ;-)


ncurses for ruby, this is really cool, I hope it works on WinXP, I will try it 
out now. I was going to make a lil UI and clearing the screen was just one of 
the things I wanted to do. If ncurses works, I guess I will have everything I 
need.

When you do a system("cls") it seems to do it in a subshell, so this subshell 
is cleared, which is the same as the line for this command is cleared, not 
clearing the the screen.

Danke

Sasa Velickovic