The new PCIbex Farm is here! Be sure to check out all of its new features and changes.

Link Search Menu Expand Document

function.call

description

Executes the function.

syntax

getFunction(ELEMENT_NAME).call()

example(s)


@
@newFunction("setKeyTime", function(){ this.keyTime = Date.now(); }),
@newFunction("keyTimerDelay", function(){ return Date.now() - this.keyTime > 10; }),
@newButton("Start", "Start")
@    .print()
@    .wait(),
@newText("instrutions", "Quick, you have one second to press the T key!")
@    .print(),
@newTimer("quick", 1010)
@    .start(),
@newKey("t", "T")
@    .wait(),
$getFunction("setKeyTime")
$    .call(),
@getTimer("quick")
@    .wait("first"),
@getFunction("keyTimerDelay")
@    .test.is(true)
@    .success(
@        newText("success", "Good job!")
@            .print()
@    )
@    .failure(
@        newText("failure", "Too slow...")
@            .print()
@    ),
@getButton("Start")
@    .wait()