standard.settings.after

getElement(id).settings.after( getElement(id) ) Adds some content to the right of the element. Example: [js highlight=”9,13″ try=”true”] newImage(“bad”, “no.png”) , newImage(“good”, “ya.png”) , newText(“left label”, “Bad”) .settings.before( getImage(“bad”) ) , newText(“right label”, “Good”) .settings.after( getImage(“good”) ) , newScale(“judgment”, 5) .settings.before( getText(“left label”) ) .settings.after( getText(“right label”) ) .print() .wait() [/js] Creates two image and two text …

standard.print

getElement(id).print() or getElement(id).print(x,y) (limited support in PennController 1.3, general since 1.4) or getElement(id).print(x,y,canvas) (limited support in PennController 1.3, general since 1.4) Adds the content of the element to the screen. This has no effect for non-visual elements such as the purely interactive . Since PennController 1.3, you can pass x and y values to print …

tooltip.settings.text

getTooltip(id).settings.text( “string” ) (since beta 0.3) Resets the text of the tooltip. [js highlight=”12″ try=”true”]newAudio(“sentence”, “test.mp3”) .settings.log() .print() , newTooltip(“instructions”, “Use this interface to play and replay the audio as many times as you want”) .print( getAudio(“sentence”) ) , getAudio(“sentence”) .wait() , getTooltip(“instructions”) .settings.text(“Feel free to replay if you want”) [/js] Shows an interface to …

tooltip.settings.position

getTooltip(id).settings.position(“position”) (since beta 0.3) Defines the relative position of the tooltip when it is attached to an element (bottom-right by default). If position contains top, the bottom edge of the tooltip will be aligned with the top edge of the element to which it is attached. If it contains middle, the vertical middle axis of …

tooltip.settings.log

getAudio(id).settings.log() (since beta 0.3) Will add a line in the results file each time the tooltip is validated. Example: [js highlight=”7″]newAudio(“sentence”, “test_sentence.ogg”) .settings.log() .wait() .print() , newTooltip(“instructions”, “Use this interface to replay the audio as many times as you want”) .settings.log() .print( getAudio(“sentence”) ) .wait()[/js] Starts playing the audio file testsentence.ogg_ and, when it has …

tooltip.settings.label

getTooltip(id).settings.label(“text”) (since beta 0.3) Resets the text of the validation button. Example: [js highlight=”15″ try=”true”]newAudio(“sentence”, “test.mp3”) .settings.disable() .print() .play() , newTooltip(“instruction”, “After the audio is done playing, you can replay it as many times as you want”, “Please wait”) .settings.disable() .print( getAudio(“sentence”) ) , getAudio(“sentence”) .wait() .settings.enable() , getTooltip(“instruction”) .settings.label(“OK”) .settings.enable() .wait() [/js] Adds a …

tooltip.settings.key

getTooltip(id).key(“keys”) or getTooltip(id).key(“keys”, “no click”) or getTooltip(id).key(keycode) or getTooltip(id).key(keycode, “no click”) (since beta 0.3) Makes it possible to validate the tooltip by pressing a key. You can either pass a string of keys, or pass the keycode of a specific key (e.g. 13 for enter/return). If you pass a non-null second parameter (e.g. “no click”) …

tooltip.settings.frame

getTooltip(id).settings.frame() or getTooltip(id).settings.frame(“frame-style frame-width frame-color”) (since beta 0.3) Will add a frame surrounding the element to which the tooltip is attached when it is printed. You can optionally define the aesthetics of the frame by passing a string following the CSS format for borders. [js highlight=”5″ try=”true”]newImage(“myImage”, “square.png”) .print() , newTooltip(“myTooltip”, “This is a square”) …

tooltip.wait

getTooltip(id).wait() or getTooltip(id).wait(“first”) or getTooltip(id).wait(test) (since beta 0.3) Waits until the tooltip is validated and disappears before evaluating and executing the next commands. If you call wait(“first”), then if the tooltip has already been validated at least once by the time this command is evaluated, the next commands are evaluated and executed right away. If …

tooltip.print

getTooltip(id).print() or getTooltip(id).print( getElement(id) ) (since beta 0.3) or getTooltip(id).print( x , y ) (since PennController 1.6) Adds the tooltip to the page, or attaches it to the referenced element (if any). Since PennController 1.6, you can pass x and y coordinates to print the tooltip at a specific point on the screen/document. [js highlight=”5″ …