Aborting Execution with the ESC Key

You can abort running MAXScript code by pressing and holding the ESC key. MAXScript may take a moment to respond, so hold the ESC key down until it does. The ESC key aborts any currently executing MAXScript code, whether it is in a scripted utility, a script controller, or running in the MAXScript Listener window. If the MAXScript code that is aborted is in a script controller, a Script Controller dialog is displayed showing the script used by the controller. Execution of the script controller will restart when you click the Close button.

MAXScript code locks out the rest of 3ds Max while it is executing. You cannot work interactively in 3ds Max while MAXScript code is running to avoid conflicts between code actions and your actions. If 3ds Max appears unresponsive at any time, it may be running MAXScript code which you can attempt to abort by pressing ESC. If you are testing scripts and 3ds Max doesn't return control to you within a reasonable time, press ESC to abort the code execution. You can also press ESC to abort a compilation of a multiline command in the MAXScript Listener window.

 

Use the MAXScript global variable escapeEnable in scripts to turn on and off the ESC key interrupt detection.

new.gif NEW in 3ds Max 9: The default value has been changed to false. It used to default to true in versions prior to 3ds Max 9.