getTextInput(id).settings.text(“string”) (since beta 0.3) (Re)sets the text in the input box. [js highlight=”11″ try=”true”]newTextInput(“poem”, “”) .settings.before( newText(“flowers”, “Violets are blue, roses are red, “) ) .print() , newButton(“validate”, “Validate”) .print() .wait() .remove() , getTextInput(“poem”) .settings.disable() .settings.text(“DISABLED”)[/js] Adds a one-line input box to the screen preceded with Violets are blue, roses are red, on its left, …
Wiki Category Archives:
textinput.settings.once
getTextInput(id).settings.once() Disables the input box after the key enter/return has been pressed for the first time while editing. [js highlight=”3″ try=”true”]newTextInput(“poem”, “”) .settings.before( newText(“flowers”, “Violets are blue, roses are red, “) ) .settings.once() .print() .wait() [/js] Adds a one-line input box to the screen preceded with Violets are blue, roses are red, on its left …
textinput.settings.log
getTextInput(id).settings.log() or getTextInput(id).settings.log(“final”) (since beta 0.3) or getTextInput(id).settings.log(“validate”) (since beta 0.3) or getTextInput(id).settings.log(“first”) (since beta 0.3) or getTextInput(id).settings.log(“last”) (since beta 0.3) or getTextInput(id).settings.log(“all”) (since beta 0.3) or getTextInput(id).settings.log(“final”, “first”, …) (since beta 0.3) Will add a line to the result file containing the text in the input box at the moment of the event. By …
textinput.settings.lines
getTextInput(id).settings.lines( number ) Sets the maximum number of lines for the input box (1 by default). As a special case, you set it to 0 to remove the limit constraint. Example: [js highlight=”2″ try=”true”]newTextInput(“haiku”, “hatsu shigure\nsaru mo komino o\nhoshige nari”) .settings.lines(3) .print()[/js] Adds a 3-line input box to the screen containing a haiku (note the …
textinput.settings.length
getTextInput(id).settings.length( number ) (since beta 0.3) Limits the maximum number of characters that can be entered in the input box. 0 or lower means no limit (default setting). Note that linebreaks count as characters in the limit (\n and \r). Example: [js highlight=”2″ try=”true”]newTextInput(“haiku”, “hatsu shigure\nsaru mo komino o\nhoshige nari”) .settings.length(45) .settings.lines(3) .print()[/js] Adds a …
textinput.wait
getTextInput(id).wait() or getTextInput(id).wait(“first”) or getTextInput(id).wait( test ) 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. If you call wait(“first”), then if the enter/return key was already pressed while editing when this …