Hi all,
you can download and test the beta version of the twatch perl lib at https://launchpad.net/twatch (http://https://launchpad.net/twatch). Ideas, tests, bug reports would be appreciated
Phil.
Hi,
you can download lib and the demo from this url:
http://bazaar.launchpad.net/~alexandre- ... runk/files (http://bazaar.launchpad.net/~alexandre-philippe/twatch/trunk/files)
Thanks for the direct link, I had a hard time finding it. This is an awesome script, thanks for sharing it. I posted it up, and added it to the #twatch manual.
Great work!
Cool thing! Now we only need a scroll function for long text... :)
Hi,
you can find at the same url a scroll library (beta version) and a demo.
http://bazaar.launchpad.net/~alexandre- ... runk/files (http://bazaar.launchpad.net/~alexandre-philippe/twatch/trunk/files)
@ian thank for the twatch, it's really a fun toy :)
Phil.
Nice! :)
Here's my solution (added to your TWatch.pm):
sub scrollLine
{
my ($self, $text, $row, $col) = @_;
my $msg = $text;
my $i = 0;
$row=1 if(!defined($row) || $row > $self->{_NBROW} || $row < 1);
$col=1 if(!defined($col) || $col > $self->{_NBCOL} || $col < 1);
my $sock = $self->{_SOCKET};
while (($col + length($text)-$i) > $self->{_NBCOL}) {
$msg = substr($text, $i++, ($self->{_NBCOL}-$col)+1);
print $sock chr(0xFE),chr(0x47),chr($col),chr($row);
print $sock $msg;
usleep(300000);
}
usleep(SLEEP);
}
But it was only a first try...