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!
Stopping a running macro
Moderator: DPlotAdmin
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Yes, you do.Yes, I need to add the command to suspend redraws in the macro!

But that's a good suggestion. I'll add a check for pressing <Esc>.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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.
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.
Visualize Your Data
support@dplot.com
support@dplot.com
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!
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!