MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Ticker Tape/Theater Marquee Display?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21052] Re: [mg20967] Ticker Tape/Theater Marquee Display?
  • From: BobHanlon at aol.com
  • Date: Sun, 12 Dec 1999 23:51:17 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

The following will put the message in a continuous loop until aborted.

w = 40; nb = NotebookCreate[];

s = "This string will scroll continuously across the screen--like a stock \
market ticker tape--until aborted.  " ;

While[1 > 0, NotebookWrite[nb, StringTake[s, w]]; 
  s = StringJoin[RotateLeft[Characters[s]]]; SelectionMove[nb, All, Cell];]

To speed up the scrolling, remove your Pause statement. I don't believe that 
Pause can delay less than  $TimeUnit

?? $TimeUnit

"$TimeUnit gives the minimum time interval in seconds \
recorded on your computer system."

Attributes[$TimeUnit] = {Locked, Protected}
 
$TimeUnit = Rational[1, 60]

Bob Hanlon

In a message dated 12/1/1999 3:44:45 AM, siegman at stanford.edu writes:

>I'd like to have a small routine that would scroll a text message across
>the screen inside a window, like a theater marquee or the old Times Square
>advertising displays or the stock markets quotes at the bottom of certain
>television programs.
>
>The crude solution I've come up with is:
>
>s = "This is a test string that will be scrolled across the screen like
>a
>stock market ticker tape." ;
>
>w = 40; n = 1;
>nb = NotebookCreate[];
>While[n <=StringLength[s] - w, 
>   (NotebookWrite[nb, StringTake[s, {n, n+w}], After];
>    Pause[0.00001];
>    SelectionMove[nb, All, Cell];
>    n = n + 1)]
>
>Can anyone suggest anything more sophisticated?  Why does this version
>scroll so slowly?   Anyone know of a dot matrix type font that would make
>the output look more realistic? 
>


  • Prev by Date: Re: Re: Bug? in PolyLog
  • Next by Date: Re: Checking for non-complex numerics
  • Previous by thread: Ticker Tape/Theater Marquee Display?
  • Next by thread: Re: Ticker Tape/Theater Marquee Display?