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 …

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

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 …

video.settings.log

getVideo(id).settings.log() or getVideo(id).settings.log(“play”) or getVideo(id).settings.log(“pause”) or getVideo(id).settings.log(“end”) or getVideo(id).settings.log(“seek”) Tells to add a line in the results file each time an event happens. If you do not specify which event you want to log, all of them will add a line to the results file. “play” adds a line including a timestamp and an offset, …

video.settings.once

getVideo(id).settings.once() Disables the buttons to play/pause the video right after its first playing (the video can still be played using the action play). Example: [js highlight=”5″ try=”true”] newText(“instructions”, “Please watch the video below”) .print() , newVideo(“skate”, “skate.mp4”) .settings.once() .print() .wait() [/js] Adds some instruction text to the screen and a video below the text. After …

video.wait

getVideo(id).wait() or getVideo(id).wait(“first”) or getVideo(id).wait(test) Waits until the video resource is done playing before evaluating and executing the next commands. If you call wait(“first”), then if the video has already been played at least once by the time this command is evaluated, the next commands are evaluated and executed right away. If it was never …

video.stop

getVideo(id).stop() (since beta 0.3) Stops the playback of the video and goes back to the start of it, making it impossible to resume from the current position later. Example: [js highlight=”10″ try=”true”]newVideo(“skate”, “skate.mp4”) .print() .play() , newTimer(“preview”, 2500) .start() .wait() , getVideo(“skate”) .stop()[/js] Prints and starts playing the file sentence.mp4 and stops it after 2500ms. …