If it takes long to execute a script, it will be desirable to show the progress ratio in visual UI and let the user cancel the task in the middle of it. For this case, XScript offers a global variable "monitor" .

Showing the Progress

// display name of work and amount.
monitor.beginTask("test", 100); 

for(var i = 0; i < 100; i++){
	// Delay time.

	// Notify progressed.

When the script above is executed, eXERD shows a dialogue informing the progress and the user can recognize the status in visual form.

Supporting Cancelation of a Task

If you press the Cancel button during the execution of the script, script stop to force and, the execution of the script is forced to stop and all the work performed till then will be canceled automatically.

If a script is written wrongly and fall into infinite loop, you can safely terminate it.