MathGroup Archive 2006

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

Search the Archive

Re: How to make a progress bar?

  • To: mathgroup at
  • Subject: [mg70032] Re: How to make a progress bar?
  • From: "David Reiss" <dbreiss at>
  • Date: Sun, 1 Oct 2006 04:08:13 -0400 (EDT)
  • References: <efgan3$pra$>

The trick is to use Notebook Programming.  Generally functions like
Print, and Return are in Mathematica for the sake of those coming from
other languages, but they are quit restrictive and you can't get very
far with them..

But the real powerful thing is to remember that Cells and Notebooks are
expressions that you can manipulate just as any other expression in

So with this in mind here is a refined example that might get you
started along the path you want to go.  First do something like this.

In one input Cell execute the following to create a cell with a
specific cell tag:

CellPrint[Cell[" ","Text",CellTags->"progress"]]

Now, in another cell in the same notebook, execute the following  which
finds and then writes into the end of the text in the cell that was
created by executing the previous input line


    nb=EvaluationNotebook[ ];
    NotebookFind[EvaluationNotebook[ ],"progress",All,CellTags,
    NotebookWrite[nb, "x"];


  Take a look at for the sorts of
things you can do with notebook programming and a bunch of tools that
make some of it more accessible. (Shameless plug for a useful product!)

Andrey B. wrote:
> Hello,
> Does anybody know how to force Mathematica to put symbols in one
> continuous line by repeatedly call the operator (say Print[]). If we
> call Print["a"] twice - we get two lines, and I want one line "a,a"
> It is common question when I do something like
> Do[
> MyFunction; (*Complicated and Very long*)
> Print["."] (*printed dot makes me know that an iteration has done*)
> ,{imax}]
> I get many lines with dot and I want ONE progress bar line growing,
> like
> .........
> but not
> .
> .
> .
> Is there any chance?
> Thanks,
> Andrey B.

  • Prev by Date: Re: importing html files
  • Next by Date: Re: Input, output troubles me ...
  • Previous by thread: Re: four argument form of infix
  • Next by thread: Re: Input, output troubles me ...