Michael Fellinger
8/31/2006 2:11:00 AM
On Wednesday 30 August 2006 19:37, Frank Hofmann wrote:
> Hi Paul, hi Tom,
>
> thanks for your hints. :)
> The ncurses solution didn't work, WINDOW method isn't known.
> But no problem, I'm glad about every idea. :)
>
> In the meanwhile I've solved the problem by using `stty`.
>
> ===---===---===---===---===---===
> #!/usr/bin/ruby -w
> c = `stty size`.chomp
> c =~ /\s/
> lines, columns = $`, $'
> ===---===---===---===---===---===
or, to make it a little bit more readable (no offend, but yours looks like
perl ;)
===---===---===---===---===---===
lines, columns = `stty size`.chomp.split
# ["81", "226"]
===---===---===---===---===---===
thanks for finding that out btw, i love it :)
MfG
manveru
>
> Frank