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() …

selector.settings.frame

getSelector(id).settings.frame(“border style”) Defines the style of the frame around the selected element. By default, it is set to solid 2px green. 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.frame(“dashed 3px violet”) .wait()[/js] Adds two images side by side, waits for a click on …

selector.settings.enableClicks

getSelector(id).settings.enableClicks() Makes it possible to select by clicking (default). Example: [js highlight=”12″ try=”true”]newImage(“square”, “square.png”) , newImage(“triangle”, “triangle.png”) .settings.before( getImage(“square”) ) .print() , newSelector(“shapes”) .settings.disableClicks() .settings.add( getImage(“square”) , getImage(“triangle”) ) .settings.keys( “F” , “J” ) .wait() .settings.enableClicks() [/js] Adds two images side by side and waits for a selection by pressing either the F key or …

selector.settings.disableClicks

getSelector(id).settings.disableClicks() Makes it impossible to select by clicking. If no .settings.keys command is called on the element, this makes any selection impossible. Example: [js highlight=”8″ try=”true”]newImage(“square”, “square.png”) , newImage(“triangle”, “triangle.png”) .settings.before( getImage(“square”) ) .print() , newSelector(“shapes”) .settings.disableClicks() .settings.add( getImage(“square”) , getImage(“triangle”) ) .settings.keys( “F” , “J” ) .wait() [/js] Adds two images side by side …

selector.settings.callback

getSelector(id).settings.callback( element ) or getSelector(id).settings.callback( function ) Will execute the command on the element upon next selection, or the function whenever selection happens. 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.callback( getSelector(“shapes”).shuffle() ) .wait() [/js] Adds two images side by side. The positions …

standard.settings.selector

getElement(id).settings.selector( selectorName ) or getElement(id).settings.selector( getSelector(selectorName) ) (since beta 0.3) Since beta 0.3, Selector adds a .settings.selector command to all elements as another method for adding them to a selector. Example: [js highlight=”4,7″ try=”true”]newSelector(“shapes”) , newImage(“square”, “square.png”) .settings.selector(“shapes”) , newImage(“triangle”, “triangle.png”) .settings.selector(“shapes”) , newCanvas(“shapes canvas”, 825, 400) .settings.add( 0, 0, getImage(“square”) ) .settings.add(425, 0, getImage(“triangle”) …

selector.settings.add

getSelector(id).settings.add( element1, element2, … ) Adds as many elements to the selector. By default, selection is done through clicks. See .settings.keys and .settings.enableClicks and .settings.disableClicks. Example: [js highlight=”8″ try=”true”]newImage(“square”, “square.png”) , newImage(“triangle”, “triangle.png”) .settings.before( getImage(“square”) ) .print() , newSelector(“shapes”) .settings.add( getImage(“square”) , getImage(“triangle”) ) .wait()[/js] Adds two images side by side and waits for a …

selector.wait

getSelector(id).wait() or getSelector(id).wait(“first”) or getSelector(id).wait(test) Waits until one of the elements of the selector is selected before evaluating and executing the next commands. If you call wait(“first”), then if an element has already been selected before this command is evaluated, the next commands are evaluated and executed right away. If no element was selected before, …

selector.unselect

getSelector(id).unselect() (since beta 0.3) Unselects any element currently selected.