Previous Topic: RemoteTarget.output MethodNext Topic: RemoteTarget.receivedResult Method


RemoteTarget.receivedOutput 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 output is received from the remote target. This handler can be called multiple times.

This method has the following syntax:

receivedOutput(s)

Note: The AutoShell ignores event handler return values.

Example

Specify output handler for a RemoteTarget and access associated object in the event handler:

rt = new RemoteTarget("ascli1");
// Assign output handler
rt.receivedOutput = function(s){
    qout("Output received=", s);
    qout("Originating host=", this.getHostName());
};
run-remote "! ver" on rt

See also:

RemoteTarget.output Method