How to show status / progress updates when “Redraw = false;” ?
Is there a way to show status / progress updates when “Redraw = false;”?
Example:
#language = "V8"
#async = "off"
"use strict";
status = "";
Redraw = false;
status = "Processing part 1";
Sleep(1000);
status = "Processing part 2";
Sleep(1000);
status = "Processing part 3";
Redraw = true;
In the example, “Processing part 1” and “Processing part 2” will never be shown.
The progress updates don’t necessarily have to appear in the status bar.The status bar won't be refreshed if Redraw is set to false, which is how the Redraw property is designed to function. If you need to display the status bar, temporarily change Redraw to true, and then switch it back to false when you're done.
Thanks!
In hindsight this question of mine wasn’t properly thought through.
Normally I would have used the output bar (OutputBar) for status updates, but my code already used it for messages other than status updates.
What I’m now doing is store the text for the output bar in a variable, which allows me to show status updates in the output bar.
Once done the OutputBar is cleared and the output text written to the output bar.
3 posts in this topic