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: [mg21232] Re: [mg20967] Ticker Tape/Theater Marquee Display?
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Mon, 20 Dec 1999 02:27:52 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <831tff$fke@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

How can one get that loop actually to stop?  Aborting the evaluation
doesn't seem to do it.  The only way I could was to close the target
notebook.

BobHanlon at aol.com wrote:
> 
> 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?
> >

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.       phone 413 549-1020 (H)
Univ. of Massachusetts                     413 545-2859 (W)
Amherst, MA 01003-4515


  • Prev by Date: Re: GraphicsArray and alignment of graphs
  • Next by Date: Re: text erases parts of graphics
  • Previous by thread: Re: Ticker Tape/Theater Marquee Display?
  • Next by thread: Re: Re: Ticker Tape/Theater Marquee Display?