Previous Topic: OSRedirect.hasCompleted MethodNext Topic: OSRedirect.onError Method


OSRedirect.onCompleted 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 after the child process finishes.

This method has the following syntax:

onCompleted(fCompleted)

Note: The AutoShell ignores event handler return values.

Example

Specify completion event handler:

out = new OSRedirect();
out.onCompleted = function(f){if(f)qout("ret=", this.result());};
! ver -output out

See also:

OSRedirect.result Method

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

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