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 …

text.test.text

getText(id).test.text( string ) or getText(id).test.text( /RegExp/ ) (since beta 0.3) Tests whether the text matches the string (identical, case-sensitive) or the regular expression.

text.settings.text

getText(id).settings.text( string ) Resets the text of the element. Example: [js highlight=”8″ try=”true”]newText(“onlyTextOnScreen”, “You have not pressed the spacebar yet”) .print() , newKey(“spacebar”, ” “) .wait() , getText(“onlyTextOnScreen”) .settings.text(“Now you have pressed the spacebar.”) [/js] Updates the text after the spacebar was presssed.

selector.test.selected

getSelector(id).test.selected() or getSelector(id).test.selected( element ) Tests whether an element is selected. When testing an element, remember to use a get* command, as simply typing its ID will fail (ie. test for getImage(“square”), not just “square”) Example: [js highlight=”12″ try=”true”] newImage(“square”, “square.png”) , newImage(“triangle”, “triangle.png”) .settings.before( getImage(“square”) ) .print() , newSelector(“shapes”) .settings.add( getImage(“square”) , getImage(“triangle”) ) …

selector.test.index

getSelector(id).test.index( element ) (since version 1.0) or getSelector(id).test.index( element , index ) (since version 1.0) Tests the index of an element in the selector (starting with 0). If you pass no index, the test will be a success if the element is part of the selector, else a failure. When testing an element, remember to …

selector.settings.shuffle

getSelector(id).settings.shuffle() (deprecated since beta 0.3) or getSelector(id).settings.shuffle( element1, element2, … ) See the action command

selector.settings.once

getSelector(id).settings.once() Disables the selector after the first selection has happened. Example: [js highlight=”9″ try=”true”] newImage(“square”, “square.png”) , newImage(“triangle”, “triangle.png”) .settings.before( getImage(“square”) ) .print() , newSelector(“shapes”) .settings.add( getImage(“square”) , getImage(“triangle”) ) .settings.once() [/js] Adds two images side by side and a button to click below them. Any selection is definitive: further clicks will not move the …

selector.settings.log

getSelector(id).settings.log() or getSelector(id).settings.log(“first”) (since beta 0.4) or getSelector(id).settings.log(“last”) (since beta 0.4) or getSelector(id).settings.log(“all”) A line will be added to the results file when an element is selected indicating its reference name and the timestamp of selection. Leaving the parentheses blank or calling “last” will log the last selection. Calling “first” will log the first selection. …

selector.settings.keys

getSelector(id).settings.keys( “key1”, “key2″, … ) Makes it possible to select the elements by pressing the specified keys. The keys are associated to the element in the order in which they were added, if no shuffle took place in the meantime. Example: [js highlight=”10″ try=”true”]newImage(“square”, “square.png”) , newImage(“triangle”, “triangle.png”) .settings.before( getImage(“square”) ) .print() , newSelector(“shapes”) .settings.disableClicks() …