hello estimed AnomalousMonk,
I do not wanted you doing the job in my place ;=) I just hoped you had a more precise idea of how to work with this module: infact i looked at it several times in the past and i gave up, everytime.
> to show what might be done with Win32::Console.
This is exactly my problem. What is effectively possible to do with this? The lack of SYNOPSIS in the module is well.. disorienting at least
The /eg/sample.pl runs fine here but is not a simple sample. Nor the net nor PM are source of great examples..
The module date 10 Feb 1997, by dada, the XS seems to do everything and is beyond my possibilities.
And yes your example works for me but as you said it prints everything in vertical, as you shown.
I'v played with it a bit, using what the logic of names suggested to me and got not WriteRect working as I expected:
use warnings;
use strict;
use Win32::Console qw(GENERIC_READ GENERIC_WRITE);
use Data::Dump qw(dd);
my $con_current = Win32::Console->new(GENERIC_READ | GENERIC_WRITE);
$con_current or die 'new Win32::Console failed';
my ($left, $top, $right, $bottom) = $con_current->Window;
print "Dimensions (left top right bottom):",qq($left, $top, $right, $b
+ottom \n);
my $rect = $con_current->ReadRect($left, $top, $right, $bottom);
$rect or die 'read Win32::Console failed';
#$rect =~ s{ \0\a\0 } ''xmsg;
#$rect =~ s{ [ ]+ \z } ''xmsg;
#dd $rect;
print qq{======\nBefore writing anything from Win32.:Console\n======\n
+};
$con_current->WriteRect($rect,$left, $top, $right, $bottom )or die 'wr
+ite Win32::Console failed';
print "dd of \$rect: "; dd $rect;
##OUTPUT
Dimensions (left top right bottom):0, 0, 119, 29
======
Before writing anything from Win32.:Console
======
dd of $rect: (" \0\37\0" x 3600)
I suspect \0\37\0 is because i run the sample.pl and the screen remained white on blue; after i issued color 0A (green on black) i got dd of $rect: (" \0\n\0" x 3600) so this seems to be the attribute thing;
Your good luck was now comprensible ;=)
thanks anyway
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
|