button.log

description

Adds a line to the results file each time the button is clicked.

syntax

getButton(ELEMENT_NAME).log()

example(s)


@newButton("word", "It's a word!")
$    .log()
@    .once()
@    .print()
@,
@newAudio("sound", "sound.wav")
@    .play()
@    .wait()
  • 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 .once), and if it is, it will add a line in the results file.