Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Blinking a row

by jonadab (Parson)
on Sep 10, 2003 at 02:32 UTC ( #290274=note: print w/replies, xml ) Need Help??

in reply to Blinking a row

You're going to need to tell us more about what you want. What kind of row are we talking about? A row in a relational database? A line on a terminal or console? (What kind? ANSI?) A row in a table in a widget? (What widget set? Tk? Gtk? Win32? Qt? Wx? Xaw3D?) A row in a table in a web page? A row in a table in an OpenOffice document? A row of LEDs on one of those cool computer-controlled signs? A row of pixels on your monitor?

Also, by selected, do you mean that your program has in some fashion selected this row for highlighting, or is this something the user has selected using the keyboard or mouse?

$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

Replies are listed 'Best First'.
Re: Blinking a row
by jonadab (Parson) on Sep 10, 2003 at 02:42 UTC

    Hey, I just remembered how I used to blink a row in Applesoft BASIC. I think I can emulate that effect in Perl...

    sub blinkrow { my ($rowtext) = @_; while (1) { print$/x60;sleep 1; print "$rowtext\n"; sleep 1; } }


    $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

      The \r carriage return is useful for incrementing counters but can also do blink - If you have to! A reasonable purpose would be say if the nuclear reactor powering you computer is in danger of a China Syndrome meltdown due to problems with the heavy water supply from your municipal authority....

      do{ print 0==$a++%2 ?"Core Meltdown!\r" : " \r"; sleep 1} + while 1;




Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://290274]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2017-01-22 08:55 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (187 votes). Check out past polls.