PennController for IBEX › Forums › Support › Using mouse track with dashed sentence
Tagged: dahsed sentence, mouse track
- This topic has 2 replies, 2 voices, and was last updated 3 years, 3 months ago by
Igor Costa.
-
AuthorPosts
-
May 19, 2021 at 8:57 am #6971
Igor Costa
ParticipantHi, Jeremy
I’m having some issues in coding an experiment in PCIbex. In short, I need an experiment in which the presentation sequence for each trial is as below:
1. two images are printed in the screen and stay there;
2. two seconds later, a self-paced reading sentence appears;
3. simultaneously with the start of the sentence, the possibility to click on one of the images starts;
4. when the participant clicks on a image, the trial ends, even if the participant did not finish the dashed sentence.What I want is, for instance, if there are two images of warning board, one of which is blank and another contais a message, that the participant could, when he/she sees “not empty” in the sentence, be able to click at the correct image.
I could code the first three steps, but I could not figure out how to implement the forth one. My code is below.
newTrial("frase_1", newImage("a1", "aviso1.png") .size(200,200) , newImage("a2", "aviso3.png") .size(200,200) , newMouseTracker("mouse") .log() .start() , newCanvas("canvas_esq", "40vw", "40vh") .add(250, 10, getImage("a1")) .print("center at 25vw", "middle at 50vh") , newCanvas("canvas_dir","40vw", "40vh") .add(50, 10, getImage("a2")) .print("center at 75vw", "middle at 50vh") , newTimer("pausa", 2000) .start() .wait() , newSelector("escolha") .add(getCanvas("canvas_esq"), getCanvas("canvas_dir")) .log() , newController("DashedSentence", {s: "This is not an empty warning."}) .center() .print() .log() .wait() .remove() , getMouseTracker("mouse") .stop() )
I think I might have misunderstood the .wait() element for the
newController
.Thanks in advance for any help.
—
Igor Costa
igor-costa.github.io
PhD Student at LAPAL/PUC-RioMay 19, 2021 at 1:10 pm #6972amilam
ParticipantHi,
Have you tried doing something like this:
PennController.ResetPrefix(null); newTrial("frase_1", newImage("a1", "aviso1.png") .size(200,200) , newImage("a2", "aviso3.png") .size(200,200) , newMouseTracker("mouse") .log() .start() , newCanvas("canvas_esq", "40vw", "40vh") .add(250, 10, getImage("a1")) .print("center at 25vw", "middle at 50vh") , newCanvas("canvas_dir","40vw", "40vh") .add(50, 10, getImage("a2")) .print("center at 75vw", "middle at 50vh") , newTimer("pausa", 2000) .start() .wait() , newController("DashedSentence", {s: "This is not an empty warning."}) .center() .print() .log() , newSelector("escolha") .add(getCanvas("canvas_esq"), getCanvas("canvas_dir")) .wait() .log() , getMouseTracker("mouse") .stop() )
Hope it helps!
May 19, 2021 at 1:38 pm #6973Igor Costa
ParticipantThank you, Amilam!!!
It was exactly what I was looking for and I could not thinking about putting the
.wait()
element just after the
.newSelector()
.
Thank you for your help!
-
AuthorPosts
- You must be logged in to reply to this topic.