prevkey and nextkey in trial


Author
Message
psych101
psych101
Partner Member (859 reputation)Partner Member (859 reputation)Partner Member (859 reputation)Partner Member (859 reputation)Partner Member (859 reputation)Partner Member (859 reputation)Partner Member (859 reputation)Partner Member (859 reputation)Partner Member (859 reputation)
Group: Forum Members
Posts: 14, Visits: 73
Hello, is there a way for me to add a prevkey and nextkey in a trial?

I created instructions using text and trials because for some of the instructions I want it to timeout (without giving a response), others I want to be able to do only the next key (like a welcome page), and others I need both a previous key and next key. These instructions also include pictures, and the order of the instruction screens isn't in a way where I could bunch them together based on whether they use a prev. or next key, because it goes back in forth in some cases. Therefore, I don't think using pages and the instruct element is appropriate in this case.

I have included code for the instructions. The code below isn't usable because it recognizes left and right arrow key to move, but only to move forward. So the distinctions that I have made for bidirectional (prev. and next) vs. continue (next key) aren't possible. Do you have any solutions? I would greatly appreciate your help!

Thank you


<text arrow_key_bidirectional>
/ items = ("Use the left arrowkey to go back, and the right arrowkey to continue.")
/ size = (95%,30%)
/ fontstyle = ("Arial",2%)
/ position = (50%,97%)
</text>

<text arrow_key_continue>
/ items = ("Use the right arrowkey to continue.")
/ size = (95%,30%)
/ fontstyle = ("Arial",2%)
/ position = (50%,97%)
</text>

<text welcome>
/ items = (" Welcome to the experiment! We are interested in studying how groups of individuals make decisions.
This study involves answering questions about yourself and making decisions.")
/ size = (95%,30%)
/ position = (50%, 50%)
</text>

<text instruct1>
/items = ("placeholder")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text instruct2>
/ items = ("placeholder")
/ size = (95%, 30%)
/ position = (50%, 50%)
</text>

<text instruct3>
/items = ("placeholder")
/position = (50%,20%)
</text>

<picture shape_grid>
/items = ("shape_grid.jpg")
/position = (50%,60%)
/size = (50%,50%)
</picture>

<text instruct4>
/items = ("placeholder")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text instruct5>
/ items = ("placeholder.")
/size = (95%,30%)
/position = (50%,20%)
</text>

<picture overlapping_choices_grid>
/items = ("overlapping_choices_grid.jpg")
/position = (50%,60%)
/size = (40%,40%)
</picture>

<text instruct6>
/items = ("placeholder")
/size = (95%,30%)
/position = (50%,20%)
</text>

<picture different_choices_grid>
/items = ("different_choices_grid.jpg")
/position = (50%,50%)
/size = (40%,40%)
</picture>

<text instruct7>
/items = ("placeholder")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text instruct8>
/items = ("placehlder")
/size = (95%,30%)
/position = (50%,20%)
</text>

<picture shape_grid_letters>
/ items = ("shape_grid_letters.jpg")
/ position = (50%, 60%)
/size = (40%,40%)
</picture>


<text instruct9>
/ items = ("placeholder")
/ size = (95%, 30%)
/ position = (50%, 50%)
</text>

<picture please_respond_faster>
/ items = ("please_respond_faster.jpg")
/position = (50%,60%)
/size = (40%,40%)
</picture>

<text instruct10>
/items = ("placeholder.")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text preparing_to_load_partner>
/ items = ("placeholder")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text loading_partner>
/ items = ("Loading partner...")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text successfully_found_partner>
/ items = ("placeholder")
/ size = (95%, 30%)
/ position = (50%, 50%)
</text>

<text ready_to_begin>
/ items = ("The task will begin when you are ready.")
/ size = (95%, 30%)
/ position = (50%, 50%)
</text>


<trial welcome>
/ stimulusframes = [1=welcome, arrow_key_continue]
/ validresponse = (205)
/ recorddata = false
</trial>

<trial instruct1>
/stimulusframes = [1=instruct1,arrow_key_continue]
/validresponse = (205)
/recorddata = false
</trial>

<trial instruct2>
/stimulusframes = [1=instruct2,arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct3>
/stimulusframes = [1=instruct3,shape_grid, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct4>
/stimulusframes = [1=instruct4, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct5>
/stimulusframes = [1=instruct5, overlapping_choices_grid, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct6>
/stimulusframes = [1=instruct6, different_choices_grid, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct7>
/stimulusframes = [1=instruct7, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct8>
/stimulusframes = [1=instruct8, shape_grid_letters, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct9>
/stimulusframes = [1=instruct9,please_respond_faster,arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct10>
/stimulusframes = [1=instruct10,arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>


<trial preparing_to_load_partner>
/ stimulusframes = [1=preparing_to_load_partner, arrow_key_continue]
/ validresponse = (205)
/ recorddata = false
</trial>

<trial loading_partner>
/ stimulusframes = [1=loading_partner]
/ timeout = 30000
/ recorddata = false
</trial>

<trial successfully_found_partner>
/ stimulusframes = [1=successfully_found_partner, arrow_key_continue]
/ validresponse = (205)
/ recorddata = false
</trial>

<trial ready_to_begin>
/ stimulusframes = [1=ready_to_begin,arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

***BLOCKS

<block welcome>
/ trials = [1=welcome]
</block>

<block instructions>
/ trials = [1=instruct1, instruct2, instruct3, instruct4, instruct5, instruct6, instruct7, instruct8, instruct9, instruct10]
</block>

<block preparing_to_load_partner>
/ trials = [1=preparing_to_load_partner]
</block>

<block loading_partner>
/ trials = [1=loading_partner]
</block>

<block successfully_found_partner>
/ trials = [1=successfully_found_partner]
</block>

<block ready_to_begin>
/ trials = [1=ready_to_begin]
</block>

<block fulltrial>
/ trials = [1-15=choice1]
</block>

*********************************************
EXPERIMENT
*********************************************

<expt cochoice>
/ blocks = [1=welcome; 2=mturkid; 3=consent; 4=instructions; 5=preparing_to_load_partner; 6=loading_partner; 7=successfully_found_partner; 8=ready_to_begin; 9=fulltrial]
/ onexptend = [values.completed = 1]
</expt>



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: 12K, Visits: 98K
psych101 - Friday, March 16, 2018
Hello, is there a way for me to add a prevkey and nextkey in a trial?

I created instructions using text and trials because for some of the instructions I want it to timeout (without giving a response), others I want to be able to do only the next key (like a welcome page), and others I need both a previous key and next key. These instructions also include pictures, and the order of the instruction screens isn't in a way where I could bunch them together based on whether they use a prev. or next key, because it goes back in forth in some cases. Therefore, I don't think using pages and the instruct element is appropriate in this case.

I have included code for the instructions. The code below isn't usable because it recognizes left and right arrow key to move, but only to move forward. So the distinctions that I have made for bidirectional (prev. and next) vs. continue (next key) aren't possible. Do you have any solutions? I would greatly appreciate your help!

Thank you


<text arrow_key_bidirectional>
/ items = ("Use the left arrowkey to go back, and the right arrowkey to continue.")
/ size = (95%,30%)
/ fontstyle = ("Arial",2%)
/ position = (50%,97%)
</text>

<text arrow_key_continue>
/ items = ("Use the right arrowkey to continue.")
/ size = (95%,30%)
/ fontstyle = ("Arial",2%)
/ position = (50%,97%)
</text>

<text welcome>
/ items = (" Welcome to the experiment! We are interested in studying how groups of individuals make decisions.
This study involves answering questions about yourself and making decisions.")
/ size = (95%,30%)
/ position = (50%, 50%)
</text>

<text instruct1>
/items = ("placeholder")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text instruct2>
/ items = ("placeholder")
/ size = (95%, 30%)
/ position = (50%, 50%)
</text>

<text instruct3>
/items = ("placeholder")
/position = (50%,20%)
</text>

<picture shape_grid>
/items = ("shape_grid.jpg")
/position = (50%,60%)
/size = (50%,50%)
</picture>

<text instruct4>
/items = ("placeholder")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text instruct5>
/ items = ("placeholder.")
/size = (95%,30%)
/position = (50%,20%)
</text>

<picture overlapping_choices_grid>
/items = ("overlapping_choices_grid.jpg")
/position = (50%,60%)
/size = (40%,40%)
</picture>

<text instruct6>
/items = ("placeholder")
/size = (95%,30%)
/position = (50%,20%)
</text>

<picture different_choices_grid>
/items = ("different_choices_grid.jpg")
/position = (50%,50%)
/size = (40%,40%)
</picture>

<text instruct7>
/items = ("placeholder")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text instruct8>
/items = ("placehlder")
/size = (95%,30%)
/position = (50%,20%)
</text>

<picture shape_grid_letters>
/ items = ("shape_grid_letters.jpg")
/ position = (50%, 60%)
/size = (40%,40%)
</picture>


<text instruct9>
/ items = ("placeholder")
/ size = (95%, 30%)
/ position = (50%, 50%)
</text>

<picture please_respond_faster>
/ items = ("please_respond_faster.jpg")
/position = (50%,60%)
/size = (40%,40%)
</picture>

<text instruct10>
/items = ("placeholder.")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text preparing_to_load_partner>
/ items = ("placeholder")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text loading_partner>
/ items = ("Loading partner...")
/size = (95%,30%)
/position = (50%,50%)
</text>

<text successfully_found_partner>
/ items = ("placeholder")
/ size = (95%, 30%)
/ position = (50%, 50%)
</text>

<text ready_to_begin>
/ items = ("The task will begin when you are ready.")
/ size = (95%, 30%)
/ position = (50%, 50%)
</text>


<trial welcome>
/ stimulusframes = [1=welcome, arrow_key_continue]
/ validresponse = (205)
/ recorddata = false
</trial>

<trial instruct1>
/stimulusframes = [1=instruct1,arrow_key_continue]
/validresponse = (205)
/recorddata = false
</trial>

<trial instruct2>
/stimulusframes = [1=instruct2,arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct3>
/stimulusframes = [1=instruct3,shape_grid, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct4>
/stimulusframes = [1=instruct4, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct5>
/stimulusframes = [1=instruct5, overlapping_choices_grid, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct6>
/stimulusframes = [1=instruct6, different_choices_grid, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct7>
/stimulusframes = [1=instruct7, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct8>
/stimulusframes = [1=instruct8, shape_grid_letters, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct9>
/stimulusframes = [1=instruct9,please_respond_faster,arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

<trial instruct10>
/stimulusframes = [1=instruct10,arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>


<trial preparing_to_load_partner>
/ stimulusframes = [1=preparing_to_load_partner, arrow_key_continue]
/ validresponse = (205)
/ recorddata = false
</trial>

<trial loading_partner>
/ stimulusframes = [1=loading_partner]
/ timeout = 30000
/ recorddata = false
</trial>

<trial successfully_found_partner>
/ stimulusframes = [1=successfully_found_partner, arrow_key_continue]
/ validresponse = (205)
/ recorddata = false
</trial>

<trial ready_to_begin>
/ stimulusframes = [1=ready_to_begin,arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
</trial>

***BLOCKS

<block welcome>
/ trials = [1=welcome]
</block>

<block instructions>
/ trials = [1=instruct1, instruct2, instruct3, instruct4, instruct5, instruct6, instruct7, instruct8, instruct9, instruct10]
</block>

<block preparing_to_load_partner>
/ trials = [1=preparing_to_load_partner]
</block>

<block loading_partner>
/ trials = [1=loading_partner]
</block>

<block successfully_found_partner>
/ trials = [1=successfully_found_partner]
</block>

<block ready_to_begin>
/ trials = [1=ready_to_begin]
</block>

<block fulltrial>
/ trials = [1-15=choice1]
</block>

*********************************************
EXPERIMENT
*********************************************

<expt cochoice>
/ blocks = [1=welcome; 2=mturkid; 3=consent; 4=instructions; 5=preparing_to_load_partner; 6=loading_partner; 7=successfully_found_partner; 8=ready_to_begin; 9=fulltrial]
/ onexptend = [values.completed = 1]
</expt>



Given how you set this up, the way to do this is with /branch.

<trial instruct1>
/stimulusframes = [1=instruct1,arrow_key_continue]
/validresponse = (205)
/recorddata = false
/ branch = [trial.instruct2]
</trial>

<trial instruct2>
/stimulusframes = [1=instruct2,arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
/ branch = [if (trial.instruct2.response==203) trial.instruct1 else trial.instruct3]
</trial>

<trial instruct3>
/stimulusframes = [1=instruct3,shape_grid, arrow_key_bidirectional]
/validresponse = (203, 205)
/recorddata = false
/ branch = [if (trial.instruct3.response==203) trial.instruct2 else trial.instruct4]
</trial>

(and so forth)

with

<block instructions>
/ trials = [1=instruct1]
</block>
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search