Previous Topic: RemoteTarget.errorOccurred MethodNext Topic: RemoteTarget.getError Method


RemoteTarget.execute Method

This method is the core method invoked by the run-remote command. This method should not be called directly because run-remote performs certain processing on the specified script before passing it to this method.

This method has the following syntax:

execute(strScript)

The method returns the following values:

true

Indicates that the asynchronous execution kicked off successfully.

false

Indicates that a failure occurs when starting the remote execution.

Examples

Evaluate an expression (recommended):

rt = new RemoteTarget("ascli1");
run-remote Math.sqrt(1) on rt
? get-remoteResult(rt);

Evaluate an expression (not recommended):

rt = new RemoteTarget("ascli1");
rt.execute("Math.sqrt(1)");
? get-remoteResult(rt);

See also:

run-remote Command--Execute a Script on Remote Systems (Funclet)