Function:
Pings a remote computer.
Syntax:
Ping "<remote IP address or host name>" "<number of times to ping>"
Example:
Ping "www.transoft.com" "4"
Log "ReceivedBytes: %%Ping.ReceivedBytes%%"
Log "TTL: %%Ping.TTL%%"
Log "Time: %%Ping.Time%%"
Log "ErrorID: %%Ping.ErrorID%%"
Log "ErrorString: %%Ping.ErrorString%%"
; Allow 2 lost packets
if %%Ping.numErrors%% < 3
Log "No errors"
else
Log "Errors: %%Ping.NumErrors%%"
endif
Note:
The example shows how to use the variables which are set by the 'Ping' command. The following variables contain the values of the last ping:
Ping.ReceivedBytes – Number of bytes received
Ping.TTL – Time To Live
Ping.Time – Response time
Ping.ErrorID – Error code, e.g. 11010
Ping.ErrorString – Error string, e.g. 'Request timed out'
The following variable contains the number of errors encountered during pinging:
Ping.NumErrors