Reply To: Un-select and storing mid-trial variables

PennController for IBEX Forums Support Un-select and storing mid-trial variables Reply To: Un-select and storing mid-trial variables

#4114
Jeremy
Keymaster

Hi Leo,

(1) It’s definitely an option that’s missing for the Scale element, all there is at the moment is select

(2) You can log all the selections that happen on a scale element, see scale.settings.log

In your case, since the unselect command is missing, I would probably just create a new Scale element on replay, e.g.:

  newText("contextText", "Look at the square below").print(),
  newCanvas("square", 200,200).settings.css("background","red").print(),
  newButton("ok", "OK").print().wait().remove(),
  newText("instructions", "How red is it?").print(),
  newScale("firstScale", 7).settings.log().print().wait(),
  newButton("Replay").print().wait().remove(),
  // Removing everything still on screen
  getText("contextText").remove(),
  getCanvas("square").remove(),
  getText("instructions").remove(),
  getScale("firstScale").remove(),
  // Wait 500ms before reprinting
  newTimer(500).start().wait(),
  getText("contextText").print(),
  getCanvas("square").print(),
  getButton("ok").print().wait().remove(),
  getText("instructions").print(),
  // Print a new scale
  newScale("secondScale", 7).settings.log().print().wait()

Let me know if you have any questions

Jeremy