Back buttons in a trial


Back buttons in a trial

Author
Message
inquisituser22
inquisituser22
Associate Member
Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)

Group: Forum Members
Posts: 7, Visits: 25
Hello,
I would like to add a back button for participants in my experiment to return to former pages to reference them for information. Here is my current script, which instructs participants to press "space bar" to advance through the pages, so I just need to add something for going back through pages.

Thank you very much!

<trial Psych>
/ stimulusframes = [1=Psych]
/ correctresponse = (" ")
/ validresponse = (" ")
/ response = correct </trial>

Dave
Dave
Supreme Being
Supreme Being (578K reputation)Supreme Being (578K reputation)Supreme Being (578K reputation)Supreme Being (578K reputation)Supreme Being (578K reputation)Supreme Being (578K reputation)Supreme Being (578K reputation)Supreme Being (578K reputation)Supreme Being (578K reputation)

Group: Administrators
Posts: 9.4K, Visits: 41K
inquisituser22 - Thursday, February 21, 2019
Hello,
I would like to add a back button for participants in my experiment to return to former pages to reference them for information. Here is my current script, which instructs participants to press "space bar" to advance through the pages, so I just need to add something for going back through pages.

Thank you very much!

<trial Psych>
/ stimulusframes = [1=Psych]
/ correctresponse = (" ")
/ validresponse = (" ")
/ response = correct </trial>

You can do that like so:

<values>
/ itemnumber = 1
</values>

<block psychblock>
/ stop = [
values.itemnumber >= 5;
]
/ trials = [1=Psych]
</block>


//press space to advance, press backspace to go back
<trial Psych>
/ ontrialend = [
if (trial.Psych.response == 57 && values.itemnumber < 5) values.itemnumber += 1;
]
/ ontrialend = [
if (trial.Psych.response == 14 && values.itemnumber > 1) values.itemnumber -= 1;
]
/ stimulusframes = [1=Psych]
/ validresponse = (57, 14)
/ branch = [
trial.Psych;
]
</trial>

<text psych>
/ items = psychitems
/ select = values.itemnumber
</text>

<item psychitems>
/ 1 = "Page 1"
/ 2 = "Page 2"
/ 3 = "Page 3"
/ 4 = "Page 4"
</item>



inquisituser22
inquisituser22
Associate Member
Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)Associate Member (250 reputation)

Group: Forum Members
Posts: 7, Visits: 25
inquisituser22 - Monday, February 25, 2019
Dave - Thursday, February 21, 2019
inquisituser22 - Thursday, February 21, 2019
Thank you very much, Dave!

Hello,
I would like to add a back button for participants in my experiment to return to former pages to reference them for information. Here is my current script, which instructs participants to press "space bar" to advance through the pages, so I just need to add something for going back through pages.

Thank you very much!

<trial Psych>
/ stimulusframes = [1=Psych]
/ correctresponse = (" ")
/ validresponse = (" ")
/ response = correct </trial>

You can do that like so:

<values>
/ itemnumber = 1
</values>

<block psychblock>
/ stop = [
values.itemnumber >= 5;
]
/ trials = [1=Psych]
</block>


//press space to advance, press backspace to go back
<trial Psych>
/ ontrialend = [
if (trial.Psych.response == 57 && values.itemnumber < 5) values.itemnumber += 1;
]
/ ontrialend = [
if (trial.Psych.response == 14 && values.itemnumber > 1) values.itemnumber -= 1;
]
/ stimulusframes = [1=Psych]
/ validresponse = (57, 14)
/ branch = [
trial.Psych;
]
</trial>

<text psych>
/ items = psychitems
/ select = values.itemnumber
</text>

<item psychitems>
/ 1 = "Page 1"
/ 2 = "Page 2"
/ 3 = "Page 3"
/ 4 = "Page 4"
</item>





Thank you very much, Dave!
GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search