When I run my programs, I like to have a progress report that can be updated. What I usually do is something like:
< - some code - >
NotebookWrite[nb," \n Station "<>station[[i]]<>" -- iteration "];
< - some more code - >
< - more code - >
What this does is print the station number stored in the list station and the iteration number j. Each time it goes through the j For loop, it erases the previous j value because of the All parameter and displays the new one.
This works OK for me, but is it a good way of doing this? Also, the line that is produced is not an output line, so the next time I run the program, it tries to evaluate the line and creates new ones for each time the program is run. How do I make it an output line so that it gets erased each time the program is run? I think I need Cell, but am not sure of exactly how to use it.
Each time through the i For loop, I have it print a new line to show the next station. How can I find the previous station and just overwrite that number with the new station[[i]] value. I tried SelectionMove, but couldn't get it to work.