By Tamara - 8/13/2020
Hi, I'm trying to create a trial where participants have to explore a page. The next trial they see depends on the stimulus they click at (either chronik or menu). Everything worked well but I also want to count the clicks of the mouse they are doing in each trial until they click the right buttons (either chronik or menu). So I ad "/ validresponse = (lbuttondown)" and "/ isvalidresponse = [if(trial.start_chronik.response == "lbuttondown"){values.mouseclick += 1; false} else true]" and unfortunately, it doesn't work anymore and I don't know why. It seems like Inquisit can't handle the different valid responses. I would be thankful for any help.
<trial start_chronik> / stimulusframes = [1=chronik, menu, startseite] / inputdevice = mouse / validresponse = (lbuttondown) / validresponse = (chronik, menu) / isvalidresponse = [if(trial.start_chronik.response == "lbuttondown"){values.mouseclick += 1; false} else true] / branch = [if (trial.start_chronik.response == "menu") trial.chronik_w2] / branch = [if (trial.start_chronik.response == "chronik") trial.chronik_w1] </trial>
|
By Dave - 8/14/2020
+xHi, I'm trying to create a trial where participants have to explore a page. The next trial they see depends on the stimulus they click at (either chronik or menu). Everything worked well but I also want to count the clicks of the mouse they are doing in each trial until they click the right buttons (either chronik or menu). So I ad "/ validresponse = (lbuttondown)" and "/ isvalidresponse = [if(trial.start_chronik.response == "lbuttondown"){values.mouseclick += 1; false} else true]" and unfortunately, it doesn't work anymore and I don't know why. It seems like Inquisit can't handle the different valid responses. I would be thankful for any help. <trial start_chronik> / stimulusframes = [1=chronik, menu, startseite] / inputdevice = mouse / validresponse = (lbuttondown) / validresponse = (chronik, menu) / isvalidresponse = [if(trial.start_chronik.response == "lbuttondown"){values.mouseclick += 1; false} else true] / branch = [if (trial.start_chronik.response == "menu") trial.chronik_w2] / branch = [if (trial.start_chronik.response == "chronik") trial.chronik_w1] </trial> Several issues here, but the blocker is that mixing mouse events (left button down or up, mouse movement, etc.) and clickable objects (chronik and menu in this case) in this particular fashion won't work. The mouse events will always take precedence, i.e. the trial will never get to registering a click on "chronik" or "menu" as its response, it'll always notice that there was a left button click first. You need a different approach, such as looping the start trial and incrementing the click counter whenever somebody clicks on a background "click anywhere" object.
<trial start_chronik> / stimulusframes = [1=clickanywhereelse, chronik, menu] / inputdevice = mouse / validresponse = (chronik, menu, clickanywhereelse) / branch = [if (trial.start_chronik.response == "clickanywhereelse") { values.mouseclick += 1; trial.start_chronik; } else if (trial.start_chronik.response == "menu") { trial.chronik_w2; } else if (trial.start_chronik.response == "chronik") { trial.chronik_w1; } ] </trial>
<shape clickanywhereelse> / shape = rectangle / color = white / size = (100%, 100%) / erase = false </shape>
<values> / mouseclick = 0 </values>
<text chronik> / items = ("Chronik") / erase = false / position = (20%, 40%) </text>
<text menu> / items = ("Menu") / erase = false / position = (20%, 60%) </text>
<trial chronik_w1> / stimulusframes = [1=clearscreen, mytext] / validresponse = (57) </trial>
<trial chronik_w2> / stimulusframes = [1=clearscreen, mytext] / validresponse = (57) </trial>
<text mytext> / items = ("<%script.currenttrial%>") </text>
<block myblock> / trials = [1=start_chronik] </block>
|
By Tamara - 8/15/2020
+x+xHi, I'm trying to create a trial where participants have to explore a page. The next trial they see depends on the stimulus they click at (either chronik or menu). Everything worked well but I also want to count the clicks of the mouse they are doing in each trial until they click the right buttons (either chronik or menu). So I ad "/ validresponse = (lbuttondown)" and "/ isvalidresponse = [if(trial.start_chronik.response == "lbuttondown"){values.mouseclick += 1; false} else true]" and unfortunately, it doesn't work anymore and I don't know why. It seems like Inquisit can't handle the different valid responses. I would be thankful for any help. <trial start_chronik> / stimulusframes = [1=chronik, menu, startseite] / inputdevice = mouse / validresponse = (lbuttondown) / validresponse = (chronik, menu) / isvalidresponse = [if(trial.start_chronik.response == "lbuttondown"){values.mouseclick += 1; false} else true] / branch = [if (trial.start_chronik.response == "menu") trial.chronik_w2] / branch = [if (trial.start_chronik.response == "chronik") trial.chronik_w1] </trial> Several issues here, but the blocker is that mixing mouse events (left button down or up, mouse movement, etc.) and clickable objects (chronik and menu in this case) in this particular fashion won't work. The mouse events will always take precedence, i.e. the trial will never get to registering a click on "chronik" or "menu" as its response, it'll always notice that there was a left button click first. You need a different approach, such as looping the start trial and incrementing the click counter whenever somebody clicks on a background "click anywhere" object. <trial start_chronik> / stimulusframes = [1=clickanywhereelse, chronik, menu] / inputdevice = mouse / validresponse = (chronik, menu, clickanywhereelse) / branch = [if (trial.start_chronik.response == "clickanywhereelse") { values.mouseclick += 1; trial.start_chronik; } else if (trial.start_chronik.response == "menu") { trial.chronik_w2; } else if (trial.start_chronik.response == "chronik") { trial.chronik_w1; } ] </trial> <shape clickanywhereelse> / shape = rectangle / color = white / size = (100%, 100%) / erase = false </shape> <values> / mouseclick = 0 </values> <text chronik> / items = ("Chronik") / erase = false / position = (20%, 40%) </text> <text menu> / items = ("Menu") / erase = false / position = (20%, 60%) </text> <trial chronik_w1> / stimulusframes = [1=clearscreen, mytext] / validresponse = (57) </trial> <trial chronik_w2> / stimulusframes = [1=clearscreen, mytext] / validresponse = (57) </trial> <text mytext> / items = ("<%script.currenttrial%>") </text> <block myblock> / trials = [1=start_chronik] </block> Thanks a lot - it works!
|
|