We just recently put together a script for calculating and adding square-footage to our shop drawings. It works well overall; I can click the region to count and then click where I want the note, and just go through a whole file adding the notes as needed.
But because it works like a tool I have a habit of hitting escape when I am done. This is a problem because the script changes various settings first (hides certain layers, sets a couple attributes) and when I finish (by hitting enter again) the script ends by re-activating the various layer and other attributes. But when I hit escape the script exits and those final commands don't get called.
Is there any way that I can get the escape key to work as a break point just within a certain section instead of the whole script? Thus if I hit escape, it just exits the while loops and finishes running the rest of the tool. Or would it be possible to nest one script in another and if I hit escape it just exits to the first script (which would just finish all the clean-up commands) ?
