Back buttons in a trial


Author
Message
inquisituser22
inquisituser22
Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)
Group: Forum Members
Posts: 96, Visits: 339
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!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
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
Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)
Group: Forum Members
Posts: 96, Visits: 339
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>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search