Code: Select all
ShowMessage("Starting document clean-up…");
// turn off screen updating
Document.BeginUpdate();
// turn word-wrap off
if (Document.Wordwrap) {
Document.Wordwrap = false;
}
Code: Select all
// turn on screen updating
Document.EndUpdate();
ShowMessage("…Done!");
There's a key combo to halt a running script, but I usually can't remember it. -- Now, could we have a new command, that would single-handedly:
a) spawn a modal window with script's file name and a button to stop it
b) turn off screen updating and word-wrap
and after the script has been run
c) close the window and show message "Script completed successfully" and [ OK ] button
This way there will be some visual feedback to the unresponsive editor ("wait a sec, the editor is running a script") and a handy way to stop the script. If the script is hung etc., appropriate message could be displayed on the window.