Previous Topic: OSRedirect.receivedOutput Method

Next Topic: OSRedirect.result Method


OSRedirect.receivedResult Method

Event handlers are optional functions that can be implemented in user scripts and called by AutoShell when certain events occur. If present, the event handler is called when the exit code of the child process is set.

This method has the following syntax:

receivedResult(rc)

Note: The AutoShell ignores event handler return values.

Example

Display exit code from event handler:

out = new OSRedirect();
out.receivedResult = function(rc){qout("Exit code", rc);};
! ver -output out

See also:

! Command--Invoke Command or Child Process (Cmdlet)

!! Command--Invoke Command or Child Process and Auto-capture Output (Cmdlet)

OSRedirect.receivedOutput Method