Exiting a Script Execution in a Modal Dialog

There are two broad approaches a script developer can take to complete or exit an IEG script execution in a modal dialog: