var.settings.local

getVar(id).settings.local() (since beta 0.3) Makes the Var element accessible only from the script of the current PennController instance (default setting). If a Var element with the same named was made global before (using .settings.global()—see above) then the Var element reverts to being local (while keeping its current value), meaning that any further Var element with …

var.settings.global

getVar(id).settings.global() (since beta 0.3) Makes the Var element accessible from the script that has not been evaluated yet (=~ all the script below .settings.global()). Note: any newVar command using the same id will be ignored if it comes further below the .global() setting command. This is particularly helpful when calling newVar in the Header, the …

var.set

getVar(id).set( value ) (since beta 0.3) or getVar(id).set( function ) Sets the Var element to the specified value. You can pass a function as value, which takes the current value of the Var element as an argument and should return the new value to which it will be updated. Example: [js highlight=”14″ try=”true”]defaultText .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 …