IsConnected Function

Action

Tests whether or not a machine has been connected to the Agent with the Connect function and has not been disconnected by the Disconnect function.

Syntax

bTest = IsConnected[sMachName | hTarget])
Variable Description
bTest TRUE if the specified machine is connected. BOOLEAN.
sMachName Optional: The name of the machine. If you specify no machine, IsConnected returns TRUE if any machine is connected to the Agent. STRING.
hTarget Optional: A handle to the machine. HMACHINE.

Notes

You can optionally supply sMachName or hTarget, but not both.

Example

HMACHINE target_machineA
STRING sTargetA = "sunfish"           // one target computer
STRING sTargetB = "moonray"           // another target computer

target_machineA = Connect(sTargetA)
Print (IsConnected (sTargetA))        // prints: TRUE
Print (IsConnected (target_machineA)) // prints: TRUE
Print (IsConnected (sTargetB))        // prints:FALSE