standard.settings.bold

getElement(id).settings.bold() Makes any text in the element appear boldfaced. Example: [js highlight=”2″ try=”true”] newText(“warnning”, “NOTE: this text is a warning!”) .settings.bold() .settings.italic() .settings.color(“red”) .print() [/js] Prints a text in boldface, italic and red.

standard.settings.before

or getElement(id).settings.before( getElement(id) ) Adds some content to the left of the element. Example: [js highlight=”6,12″ 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 …

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 …

button.test.clicked

getButton(id).test.clicked() (since beta 0.3) Tests whether the button was ever clicked before.

button.settings.log

getButton(id).settings.log() Adds a line to the results file each time the button is clicked. Example: [js highlight=”2″]newButton(“word”, “It’s a word!”) .settings.log() .settings.once() .print() , newAudio(“sound”, “sound.wav”) .play() .wait()[/js] Adds a button to the screen, plays the audio file sound.wav and proceeds when the audio is done playing. The button can only be clicked once (see …

button.settings.once

getButton(id).settings.once() Disables the button right after it is clicked for the first time. Example: [js highlight=”3″ try=”true”]newButton(“test”, “It’s a test!”) .settings.log() .settings.once() .print() , newAudio(“sound”, “test.mp3”) .play() .wait()[/js] Adds a button to the screen, plays the audio file test.mp3 and proceeds when the audio is done playing. The button can only be clicked once, and …

button.wait

getButton(id).wait() or getButton(id).wait(“first”) or getButton(id).wait( test ) Waits until the button it clicked before evaluating and executing the next commands. If you call wait(“first”), then if the button was already clicked at least once by the time this command is evaluated, the next commands are evaluated and executed right away. If it was never clicked …