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

Link Search Menu Expand Document

textinput.wait

description

Waits until the enter/return key is pressed while entering text in the input box. Note that if you have a multiple-line input box, this can also mean insertion of a new line.

syntax

getTextInput(ELEMENT_NAME).wait()

alternate(s)

  • getTextInput(ELEMENT_NAME).wait("first")

  • getTextInput(ELEMENT_NAME).wait( test )

notes

  • If you call wait("first"), then if the enter/return key was already pressed while editing when this command is evaluated, the next commands are evaluated and executed right away. If the enter/return key was not clicked while editing before, the next commands are only evaluated and executed after the enter/return key is clicked while editing.

  • If you pass a test on an element as an argument, it only evaluates and executes the next commands when the enter/return key is pressed while the test is successful. If the test is not successful, it will be checked again next time the enter/return key is pressed while editing.

  • Adds a one-line input box to the screen preceded with Violets are blue, roses are red, on its left and waits for a press on the enter/return key.


example(s)


@newTextInput("poem", "")
@    .before( newText("flowers", "Violets are blue, roses are red, ") )
@    .print()
$    .wait()
  • Adds a one-line input box to the screen preceded with Violets are blue, roses are red, on its left and waits for a press on the enter/return key.