I have made a simple "percent complete" output to track my For loop, where I incrementally print values and then delete the output right before printing the next value. I want the output to remain on a single line, just as I have it.

startvalue = 1;
stopvalue = 70;
For[n = startvalue, n <= stopvalue, n++,
  If[Mod[(n - startvalue), 10] == 0,
    NotebookFind[SelectedNotebook[], "PrintTemporary", All, CellStyle];
        "Percent Complete: ", 
        ToString[Round[(n-startvalue)*100/(stopvalue - startvalue), 0.1]]]]

What's annoying me is that every time PrintTemporary is output, the Mathematica window adjusts to put the output in view. Basically, every few seconds, my screen keeps jumping back to this For loop. How do I make it stop readjusting every time something is printed? I have looked at PrintAction and EvaluationCompletionAction but am not having any luck.

  • 2
    $\begingroup$ Have you looked into Monitor? $\endgroup$
    – wxffles
    Commented May 27, 2016 at 1:12


Browse other questions tagged or ask your own question.