Originally Posted By: Les
When you use Exit on the spawned script, pass a parm to it and that will be returned to the parent script. There is a FAQ on that.


Hoooo ! I see ! God I am learning a lot today.. (More coffee is brewing)

So if I call the child script with the SHELL command, the child script must have an EXIT command with the error code set. That way the parent Script will be able to use the value returned using @ERROR.

See example code below:

Parent Script:
....
SHELL "WKIX32 Childscript.kix"
IF (@ERROR = 0)
   Alll is well
ELSE
   We got an error
ENDIF

Childscript:
...
IF $Test_successful
   EXIT 0
ELSE
   EXIT 99
ENDIF

Is this correct ?


Edited by MarcInCa (2007-09-13 10:00 PM)
_________________________
Treat people the way you want to be treated.