Author Topic: 3rd option for Esc-issue, i.e. Sys(996), or better, a new "ON ESC" statment  (Read 5844 times)

Lar

  • Hero Member
  • *****
  • Posts: 2484
What I was proposing was that on the line of code before each parameter was changed the current setting would be written to an external file, outside of any looping (so the changed one does not be written). If you have to escape then you run the saved macro, restoring the settings. I will provide an example when I have some time, later today.

Lar

dcadRob

  • Hero Member
  • *****
  • Posts: 688
Ideally you would place a bookmark in the undo list.  If you pressed escape within the macro, you would either see an option to revert to the bookmarked state or it would revert automatically.
sys (996)
-don't ask just exit
-don't ask but undo if bookmark exits
-ask but do nothing on exit
-ask and give option to undo
-ask and automatically undo

paulerens

  • Hero Member
  • *****
  • Posts: 915
Yes, yes Rob.S
Now you can wait, after Esc, to see how big the damage is and then .. UNDO UNDO UNDO .. etc.
If Esc would like to go somewhere, we would at least be able to call a subroutine or a CALL, which in turn could set back the settings CHANGED.
Moreover, it does not matter if you set the "Sys settings" to where they already are.
« Last Edit: June 08, 2011, 11:16:36 AM by paulerens »

bdeck

  • Hero Member
  • *****
  • Posts: 785
I agree with the OP, as I have been programming that way for many years.

I would add that if an ON ESC command is to be implemented it should not interfere with the ANYKEY statement, which I also use to process the ESC key.

Still a DC command to archive and restore parameter settings might make life easier.

Also the ability to set UNDO markers within a macro, as requested here http://forum.designcadcommunity.com/index.php?topic=474.0  would be great.

BD

paulerens

  • Hero Member
  • *****
  • Posts: 915
For further consideration, I think.
 The problem is to terminate the program immediately after ESCape.or on-ESCape
And before, you can't send the program to nowhere.
« Last Edit: January 08, 2012, 05:29:13 PM by paulerens »