Perhaps if you embed the interactive adjustment process in a Try Catch you can catch you used the esc key, It sounds like the esc key cause an error that cause the script to end. If you catch the error you can delete the document in the catch process.
↧