APP.GetExitCode
status = APP.GetExitCode( [hWindow AS HANDLE] ) AS INTEGER
Returns the Exit Code after a script has terminated. This si the code from and END or STOP statement, for example END "Cancel" or STOP 666