Page 1 of 1
Stopping a running macro
Posted: Thu Jan 04, 2007 6:12 pm
by jsc
While I'm on the topic of not knowing what I am doing, could you add a way to stop a running macro? ESC and Ctrl-C don't seem to work.
Was just trying out a macro to standardize my colors on a file that had 4 curves with 200k points each. Each color command in the macro wanted to redraw the plot, which took 5-10 seconds each. My macro forced a redraw 16 times. Yes, I need to add the command to suspend redraws in the macro!
Posted: Thu Jan 04, 2007 6:26 pm
by DPlotAdmin
Yes, I need to add the command to suspend redraws in the macro!
Yes, you do.
But that's a good suggestion. I'll add a check for pressing <Esc>.
Posted: Thu Jan 04, 2007 6:35 pm
by jsc
Yes, it's much better that way!
Posted: Sun Jan 07, 2007 7:09 pm
by DPlotAdmin
I overlooked one obvious answer that you may not have been aware of: you can stop a running macro now by clicking the Stop button. That's assuming, of course, that you have the editor open rather than simply using "Run".
I've added a check for pressing the <Esc> key and it works, but not especially well unless you hold the key down rather than tap-tap-tap. Otherwise too many other messages get in the way and <Esc> won't be processed soon enough to do much good.
Posted: Sun Jan 07, 2007 10:28 pm
by jsc
Nope, I was running the macro from the File>Run command, so the editor was not open.
RE: Holding the Esc key - I think that would be acceptable and understood behavior. You would not want to slow down the macro facility just because the program stopped frequently to "listen" for the esc key.
Of course, I also think I'll remember to add PostponeRedraw() and ViewRedraw() to my macros from now on, too!