var.settings.log

getVar(id).settings.log() (since beta 0.4) or getVar(id).settings.log(“final”) or getVar(id).settings.log(“set”) Adds a line to the results file indicating the value of the Var element. Blank of “final” are equivalent and will add a line reporting the value of the Var element at the end of the trial. Passing “set” will add a line for each .set command …

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 …

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

timer.settings.log

getTimer(id).settings.log() Will add a line to the results file each time the timer starts and each time it ends. Example: [js try=”true” highlight=”5″] newText(“pleasewait”, “Please wait 1s.”) .print() , newTimer(“wait”, 1000) .settings.log() .start() .wait() , newButton(“continue”, “Now click here to continue.”) .print() .wait() [/js] Adds the text Please wait 1s to the screen, starts a …