Group: Forum Members
Posts: 52,
Visits: 250
|
Hey there
Hope all is well. There are two parts to very minor this: participants first read an information sheet, and then are presented with the consent form (both html documents, this is a must). I have successfully coded 'next' and 'back' buttons, respectively, after some practice/scrolling through forums. The script runs fine too!
On the consent sheet, they either consent (moves onto next script in batch) or they do not consent (aborts script/terminates batch, they cannot proceed).
The issue is the following: When pressing 'agree to consent' option', it requires two clicks of the mouse to register. After the first click, the consent form remains on screen (it reloads itself after a very brief flash/screen refresh).
Pressing 'do not consent' option is fine and behaves accordingly. All that is needed then is agree to consent registers on one click (with mouse) once pressed. I pasted the script below. I have a feeling it has something to do with values or /stop in the block, but I cannot put my finger on it :(
Thank you kindly in advance!
************************************** HTMLs ************************************** <html Consent> /items = ("Consent.html") / valign = center / halign = center /position = (50%, 40%) / size = (70%, 70%) </html>
<html Info> /items = ("Info.html") / valign = center / halign = center /position = (50%, 40%) / size = (70%, 70%) </html>
************************************** STIMULI ************************************** <text agree> /items = ("I agree to participate") /position = (75%, 80%) / fontstyle = ("Arial", 1.50%, false, false, false, false, 5, 1) / txcolor = (white) /txbgcolor = (black) /size = (10%, 5%) / vjustify = center </text>
<text disagree> /items = ("I do not agree to participate") /position = (25%, 80%) / fontstyle = ("Arial", 1.50%, false, false, false, false, 5, 1) / txcolor = (white) /txbgcolor = (black) /size = (10%, 5%) /vjustify = center </text>
<text next1> /items = ("NEXT") /position = (90%, 90%) / fontstyle = ("Arial", 1.50%, false, false, false, false, 5, 1) / txcolor = (black) / txbgcolor = (white) /size = (3%, 3%) /vjustify = center </text>
<text back1> /items = ("BACK") /position = (10%, 90%) / fontstyle = ("Arial", 1.50%, false, false, false, false, 5, 1) / txcolor = (black) / txbgcolor = (white) /size = (3%, 3%) /vjustify = center </text>
<values> / itemnumber = 1 </values>
************************************** TRIALS. Next = next trial Back = go back a trial Do not consent = abort script, they cannot do exp. Consent = moves on to the next script in batch ************************************** <trial Info> /inputdevice = mouse /stimulustimes = [0 =Info; 0=next1] /validresponse = (next1) / branch = [if(trial.Info.response == "next1")trial.Consent] </trial>
<trial Consent> /inputdevice = mouse /stimulusframes = [1 = Consent, agree, disagree, back1] /validresponse = (agree, disagree, back1) / correctresponse = ("agree") /ontrialend = [if (trial.Consent.response == "disagree") script.abort()] / branch = [if(trial.Consent.response == "back1") trial.Info] </trial>
************************************** BLOCK ************************************** <block Info> / stop = [values.itemnumber >=3;] / trials = [1=Info] </block>
<block Consent> / stop = [values.itemnumber >=3;] / trials = [1=Consent] </block>
<expt> / blocks = [1 = Info; 2 = Consent] </expt>
|