Question: progress indicator in a for loop?

So I have this long-ish for...do...end do loop that involves all sort of things incl. running an external program (via system() ) and fitting a nonlinear expression to the result; the loop iterating a parameter for the external calculation.

It would be swell if I could run something like a progress bar that tells how many cycles done and still to go. Even better if I could get at the value of a certain variable that indicates progress of the whole calculation (which is an optimization problem). As it stands the worksheet is locked while being evaluated, until the loop is done. I know I can get some indication by having a ";" after the end do, but that tends to clutter the sheet with to much junk, making work impossible. Either  visual indicator (progressbar) or a printed number that updates (i.e. gets overprinted on each pass) is what I am looking for. I tried fprint, but that seems to flush the buffer only at termination of the loop, so I don't get the progress indication until the evalluation is complete,

TIA,

Mac Dude.

Please Wait...