mousetracker.log

getMouseTracker(id).log() Will add a line in the results file at the end of the trial reporting the mouse coordinates between and . See the discussion and example script on the page for more information about the format of the string reporting the coordinates.

scale.settings.label

getScale(id).settings.label(index,label) Sets the content of the index-th label (with index starting at 0). This will mostly be useful if you want to use something like an Image element as a label, which cannot be passed as a direct parameter when creating the new Scale. [js highlight=”2,3″ try=”true”] newScale(“score”, “Bad”, “So-so”, “Good”) .settings.label( 0 , newImage(“no.png”) …

mediarecorder.once

getMediaRecorder(id).once() (since PennController 1.8) Disables the button to record after the first recording. You can still play back the recording, or programmatically start a new recording using the command record. Example: [js highlight=”5″ try=”data”]InitiateRecorder(“https://myserver/upload.php”); newTrial( newMediaRecorder(“recorder”) .once() .print() .wait() .play() .wait(“playback”) );[/js] Adds a media player and a recording button to the page, and when …

mediarecorder.log

getVoiceRecorder(id).log() (since PennController 1.8) Will add a line whenever a recording starts and whenever it stops. Note that a line with the filename of the recorded sample is always logged anyway even if you do not call .log(), so you can identify it in the output archive. [js highlight=”2″]newMediaRecorder(“recorder”) .log() .print() .wait() [/js] Adds a …

html.settings.radioWarning

getHtml(id).settings.radioWarning( message ) Defines the error message that gets displayed if no radio button of an obligatory group is checked when calling . If you use %name% in the string it will be replaced with the element’s name. Example: [js highlight=”4″ try=”true”]newHtml(“intro”, “example_intro.html”) .settings.checkboxWarning(“It is highly recommended that you check the ‘%name%’ box before continuing”) …

html.settings.inputWarning

getHtml(id).settings.inputWarning( message ) Defines the error message that gets displayed if an obligatory input field is not filled when calling . If you use %name% in the string it will be replaced with the element’s name. Example: [js highlight=”3″ try=”true”]newHtml(“intro”, “example_intro.html”) .settings.checkboxWarning(“It is highly recommended that you check the ‘%name%’ box before continuing”) .settings.inputWarning(“We would …

html.settings.checkboxWarning

getHtml(id).settings.checkboxWarning( message ) Defines the error message that gets displayed if an obligatory checkbox is not checked when calling . If you use %name% in the string it will be replaced with the element’s name. Example: [js highlight=”2″ try=”true”]newHtml(“intro”, “example_intro.html”) .settings.checkboxWarning(“It is highly recommended that you check the ‘%name%’ box before continuing”) .settings.radioWarning(“Please consider selecting …

video.settings.disable

getVideo(id).settings.disable() or getVideo(id).settings.disable(opacity) (since PennController 1.6) Will disable the controls interface. Note that some browsers might make the controls disappear altogether. If you pass no parameter, a 50% opaque layer will be printed on top of the interface. You can pass a value from 0.01 (fully transparent***) to 1 (fully opaque) to control the aspect …

audio.settings.disable

getAudio(id).settings.disable() or getAudio(id).settings.disable(opacity) (since PennController 1.6) Will disable the controls interface. Note that some browsers might be render disabled interfaces as a plain gray rectangle with no controls visible whatsoever. If you pass no parameter, a 50% opaque layer will be printed on top of the interface. You can pass a value from 0.01 (fully …

dropdown.settings.once

getDropDown(id).settings.once() (since PennController 1.5) Will disable the DropDown element after selection occurs. Example: [js highlight=”2″ try=”true”]newText(“I saw Erika talk to Nate.”) .settings.after( newDropDown(“”).settings.add(“He”,”She”).settings.once() ) .settings.after( newText(“seemed anxious.”) ) .print()[/js] Prints I saw Erika talk to Nate. ___ seemed nervous onto the page, where ___ is a drop-down list containing the options He and She. The …