dropdown.settings.add

getDropDown(id).settings.add(“option”) or getDropDown(id).settings.add(“option1″,”option2″,…) Adds an option, or several options to the drop-down list. Example: [js highlight=”2″ try=”true”]newDropDown(“language” , “First language”) .settings.add( “English” , “French” , “Tagalog” ) .print() [/js] Creates a drop-down list with default text First language and adds three options to it: English, French and Tagalog, then prints the list onto the page.

dropdown.wait

getDropDown(id).wait() or getDropDown(id).wait(“first”) or getDropDown(id).wait(test) Waits until an option is selected from the drop-down list before proceeding. If you call wait(“first”), then if an option has already been selected by the time this command is evaluated, the next commands are evaluated and executed right away. If no option has been selected so far, the next …

dropdown.select

getDropDown(id).select( “option” ) Selects an option in the drop-down list. Nothing happens if the option passed as an argument does not exist. Example: [js highlight=”3″ try=”true”]newDropDown(“warmth”, “”) .settings.add(“hot”, “lukewarm”, “cold”) .select( “lukewarm” ) , newText(“Spring in Colorado is  “) .settings.after( getDropDown(“warmth”) ) .print()[/js] Creates a drop-down list containing the options hot, lukewarm and cold, selects …

dropdown.shuffle

getDropDown(id).shuffle() or getDropDown(id).shuffle( “keep selected” ) Shuffles the options that have been added to the DropDown so far. If you call shuffle before settings.add then it will have no effect. Passing an argument means that you want any option currently selected to remain selected after the shuffle (“keep selected” is simply given as an example—you …

PennController.Debug

PennController.Debug() (since PennController 1.2) Note: since PennController 1.4, this command is executed by default so you no longer need to call it. Runs your experiment in Debug mode. A pop-in console appears at the bottom-right corner of the page when your experiment runs in Debug mode. The Debug console gives you information on the experiment’s …

timer.stop

getTimer(id).stop() (since version 1.1) Stops the timer early. Nothing happens if the timer has already elapsed. When timers are stopped early, the script proceeds in the same way as if they had elapsed on their own: any command associated to the timer is executed and any command on the timer is resolved. [js highlight=”8″ try=”true”] …

PennController().label

PennController().label( name ) (since PennController 1.1) or newTrial().label( name ) since PennController 1.7 This is another way to assign a label to a PennController trial so you can refer to it in . It is most useful called on or since those commands do not take labels as arguments. Example: [js highlight=”1,7″] Sequence( “practice” , …

standard.refresh

getElement(id).refresh() (since PennController 1.1) Calls the command again on the element, while leaving it where it was printed last. This command is primarily useful if some aesthetic command does not take effect unless print is called afterward, but you do not want to call print because calling it when you need the aesthetic command to …

PennController.SetCounter

PennController.SetCounter() (since PennController 1.1) or PennController.SetCounter( “label” ) (since PennController 1.1) or PennController.SetCounter( number ) (since PennController 1.1) or PennController.SetCounter( “label” , number ) (since PennController 1.1) or PennController.SetCounter( “inc” , number ) (since PennController 1.1) or PennController.SetCounter( “label” , “inc”, number ) (since PennController 1.1) Creates an item that will set Ibex’s internal counter …

PennController.SendResults

PennController.SendResults() (since PennController 1.1) or PennController.SendResults( “label” ) (since PennController 1.1) Since PennController 1.7, SendResults can be used in three different environments: On its own, it creates a trial whose sole function will be to send the results to the server when it is run. You can give a label to the trial by passing …