Difference between revisions of "Target"

From OpenEUO
Jump to: navigation, search
m
m
Line 1: Line 1:
''target implemented, but undocumented''
 
 
 
 
== Calling Convention ==
 
== Calling Convention ==
 
Call
 
Call

Revision as of 14:10, 2 November 2010

Calling Convention

Call

local targ, time = sl.target([timeout])

Args

timeout (optional) is the number of milliseconds to wait before timing out

Results

targ is a boolean and reflects the current status of UO.TargCurs
time is the number of milliseconds that have elapsed during the call

Usage Example

local targ, time = sl.target(1500)
print(tostring(targ)..' '..tostring(time))
--> 'true 780'

Description

Target acts like easyuo's target statement; waiting for UO.TargCurs to toggle to true or timing out. Override timeout values are specified in milliseconds. The default timeout is 3 seconds. Target returns the current value of UO.TargCurs and the time elapsed (in ms) during the call.

Upon Error

A timeout argument which cannot be converted to a number is silently converted into the default timeout duration. Only a logical run time error in the library itself would cause an error; this error would be recorded and handled according to the operant error redirection mode.

See Also