Spacebar navigation through text stimuli


Author
Message
darbyh
darbyh
Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)
Group: Forum Members
Posts: 22, Visits: 77
Hi!

I'm currently trying to present text stimuli in a trial which participants can navigate through using the spacebar, but I can't find a way to do it without making each text stimulus its own trial. Here's my script:

<trial cond1>
/ stimulusframes = [1=instructiontxt1, continue; 2=thecrime1, continue; 3=vignette1, continue; 4=theproscase1, continue; 5=prosecution1, continue; 6=thedefcase1, continue; 7=defense1, continue]
/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

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: 105K
darbyh - Friday, January 27, 2017
Hi!

I'm currently trying to present text stimuli in a trial which participants can navigate through using the spacebar, but I can't find a way to do it without making each text stimulus its own trial. Here's my script:

<trial cond1>
/ stimulusframes = [1=instructiontxt1, continue; 2=thecrime1, continue; 3=vignette1, continue; 4=theproscase1, continue; 5=prosecution1, continue; 6=thedefcase1, continue; 7=defense1, continue]
/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

> I can't find a way to do it without making each text stimulus its own trial

Use a <list> element and select the text stimuli sequentially from the list. Run the trial 7 times:

<block cond1block>
/ trials = [1-7 = cond1]
</block>


<trial cond1>
/ ontrialbegin = [trial.cond1.insertstimulusframe(list.textstims.nextvalue, 1); ]
/ ontrialbegin = [trial.cond1.insertstimulusframe(text.continue, 1);]
/ ontrialend = [trial.cond1.resetstimulusframes();]

/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<list textstims>
/ items = (text.instructiontxt1, text.thecrime1, text.vignette1, text.theproscase1, text.prosecution1, text.thedefcase1, text.defense1)
/ selectionmode = sequence
</list>


<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>


darbyh
darbyh
Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)
Group: Forum Members
Posts: 22, Visits: 77
Dave - Friday, January 27, 2017
darbyh - Friday, January 27, 2017
Hi!

I'm currently trying to present text stimuli in a trial which participants can navigate through using the spacebar, but I can't find a way to do it without making each text stimulus its own trial. Here's my script:

<trial cond1>
/ stimulusframes = [1=instructiontxt1, continue; 2=thecrime1, continue; 3=vignette1, continue; 4=theproscase1, continue; 5=prosecution1, continue; 6=thedefcase1, continue; 7=defense1, continue]
/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

> I can't find a way to do it without making each text stimulus its own trial

Use a <list> element and select the text stimuli sequentially from the list. Run the trial 7 times:

<block cond1block>
/ trials = [1-7 = cond1]
</block>


<trial cond1>
/ ontrialbegin = [trial.cond1.insertstimulusframe(list.textstims.nextvalue, 1); ]
/ ontrialbegin = [trial.cond1.insertstimulusframe(text.continue, 1);]
/ ontrialend = [trial.cond1.resetstimulusframes();]

/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<list textstims>
/ items = (text.instructiontxt1, text.thecrime1, text.vignette1, text.theproscase1, text.prosecution1, text.thedefcase1, text.defense1)
/ selectionmode = sequence
</list>


<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>


This works perfectly! Thank you!
darbyh
darbyh
Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)
Group: Forum Members
Posts: 22, Visits: 77
Dave - Friday, January 27, 2017
darbyh - Friday, January 27, 2017
Hi!

I'm currently trying to present text stimuli in a trial which participants can navigate through using the spacebar, but I can't find a way to do it without making each text stimulus its own trial. Here's my script:

<trial cond1>
/ stimulusframes = [1=instructiontxt1, continue; 2=thecrime1, continue; 3=vignette1, continue; 4=theproscase1, continue; 5=prosecution1, continue; 6=thedefcase1, continue; 7=defense1, continue]
/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

> I can't find a way to do it without making each text stimulus its own trial

Use a <list> element and select the text stimuli sequentially from the list. Run the trial 7 times:

<block cond1block>
/ trials = [1-7 = cond1]
</block>


<trial cond1>
/ ontrialbegin = [trial.cond1.insertstimulusframe(list.textstims.nextvalue, 1); ]
/ ontrialbegin = [trial.cond1.insertstimulusframe(text.continue, 1);]
/ ontrialend = [trial.cond1.resetstimulusframes();]

/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<list textstims>
/ items = (text.instructiontxt1, text.thecrime1, text.vignette1, text.theproscase1, text.prosecution1, text.thedefcase1, text.defense1)
/ selectionmode = sequence
</list>


<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>


If I want the final screen to have both text and pictures, is it possible to pull up two list items at the same time?
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: 105K
darbyh - Friday, January 27, 2017
Dave - Friday, January 27, 2017
darbyh - Friday, January 27, 2017
Hi!

I'm currently trying to present text stimuli in a trial which participants can navigate through using the spacebar, but I can't find a way to do it without making each text stimulus its own trial. Here's my script:

<trial cond1>
/ stimulusframes = [1=instructiontxt1, continue; 2=thecrime1, continue; 3=vignette1, continue; 4=theproscase1, continue; 5=prosecution1, continue; 6=thedefcase1, continue; 7=defense1, continue]
/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

> I can't find a way to do it without making each text stimulus its own trial

Use a <list> element and select the text stimuli sequentially from the list. Run the trial 7 times:

<block cond1block>
/ trials = [1-7 = cond1]
</block>


<trial cond1>
/ ontrialbegin = [trial.cond1.insertstimulusframe(list.textstims.nextvalue, 1); ]
/ ontrialbegin = [trial.cond1.insertstimulusframe(text.continue, 1);]
/ ontrialend = [trial.cond1.resetstimulusframes();]

/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<list textstims>
/ items = (text.instructiontxt1, text.thecrime1, text.vignette1, text.theproscase1, text.prosecution1, text.thedefcase1, text.defense1)
/ selectionmode = sequence
</list>


<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>


If I want the final screen to have both text and pictures, is it possible to pull up two list items at the same time?

Yes, that's certainly possible, and you shouldn't even need the <list> for that. Define the <picture> element(s) you wish to display and then insert them in the 7th instance of the <trial>.

<picture example>
/ items = ("example.jpg")
...
</picture>

<trial cond1>
/ ontrialbegin = [trial.cond1.insertstimulusframe(list.textstims.nextvalue, 1); ]
/ ontrialbegin = [
    if(block.cond1block.currenttrialnumber == 7) trial.cond1.insertstimulusframe(picture.example, 1)
]

/ ontrialbegin = [trial.cond1.insertstimulusframe(text.continue, 1);]
/ ontrialend = [trial.cond1.resetstimulusframes();]
/ inputdevice = keyboard
/ validresponse = (" ")
</trial>
darbyh
darbyh
Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)
Group: Forum Members
Posts: 22, Visits: 77
Dave - Friday, January 27, 2017
darbyh - Friday, January 27, 2017
Dave - Friday, January 27, 2017
darbyh - Friday, January 27, 2017
Hi!

I'm currently trying to present text stimuli in a trial which participants can navigate through using the spacebar, but I can't find a way to do it without making each text stimulus its own trial. Here's my script:

<trial cond1>
/ stimulusframes = [1=instructiontxt1, continue; 2=thecrime1, continue; 3=vignette1, continue; 4=theproscase1, continue; 5=prosecution1, continue; 6=thedefcase1, continue; 7=defense1, continue]
/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

> I can't find a way to do it without making each text stimulus its own trial

Use a <list> element and select the text stimuli sequentially from the list. Run the trial 7 times:

<block cond1block>
/ trials = [1-7 = cond1]
</block>


<trial cond1>
/ ontrialbegin = [trial.cond1.insertstimulusframe(list.textstims.nextvalue, 1); ]
/ ontrialbegin = [trial.cond1.insertstimulusframe(text.continue, 1);]
/ ontrialend = [trial.cond1.resetstimulusframes();]

/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

<list textstims>
/ items = (text.instructiontxt1, text.thecrime1, text.vignette1, text.theproscase1, text.prosecution1, text.thedefcase1, text.defense1)
/ selectionmode = sequence
</list>


<text continue>
/items = ("Press spacebar to continue")
/ position = (60%, 80%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
</text>

<text instructiontxt1>
/ items = ("Please imagine that you were selected as a member of the jury for a criminal trial.~nThe following is a summary of the trial proceedings from the case.")
/ size = (75%, 75%)
/ fontstyle = ("Arial", 4.5%, true, false, false, false, 5, 0)
/ vjustify = center
</text>

<text thecrime1>
/ items = ("The Crime")
/ size = (85%, 85%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text vignette1>
/ items = ("Jack Smith, age 25, is charged with larceny. Under your state’s law, larceny is defined as “the unlawful taking of property with the intent never to return it.” On July 24th, 2016, witnesses report seeing Mr. Smith at the Bakersfield Fair around 10:30 p.m. These witnesses recall seeing Mr. Smith walk over to a group of people he did not appear to know, pick up a backpack that was sitting on the ground next to the group, and walk away with it. The backpack belonged to Sam Turner and upon seizure by the police, the backpack and its contents were found to be valued at $350. The backpack was later returned to Mr. Turner.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text theproscase1>
/ items = ("The Prosecution Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text prosecution1>
/ items = ("Witnesses saw Mr. Smith walk up to a group of people he did not know and pick up a backpack that was on the ground next to Mr. Turner. The prosecution argued that Mr. Smith knowingly took the backpack, which did not belong to him, with the intent to keep it indefinitely.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text thedefcase1>
/ items = ("The Defense Case")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 10%, true, false, false, false, 5, 0)
/ vposition = 40
</text>

<text defense1>
/ items = ("Mr. Smith admitted to taking the backpack. The defense attorney produced the results of a drug test that was administered to Mr. Smith upon his arrest. Mr. Smith tested negative for drugs. The defense argued that Mr. Smith’s did not act with the intent never to return the backpack when he took it. Therefore, he cannot be legally convicted of larceny.")
/ size = (90%, 90%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)
/ vposition = 40
</text>


If I want the final screen to have both text and pictures, is it possible to pull up two list items at the same time?

Yes, that's certainly possible, and you shouldn't even need the <list> for that. Define the <picture> element(s) you wish to display and then insert them in the 7th instance of the <trial>.

<picture example>
/ items = ("example.jpg")
...
</picture>

<trial cond1>
/ ontrialbegin = [trial.cond1.insertstimulusframe(list.textstims.nextvalue, 1); ]
/ ontrialbegin = [
    if(block.cond1block.currenttrialnumber == 7) trial.cond1.insertstimulusframe(picture.example, 1)
]

/ ontrialbegin = [trial.cond1.insertstimulusframe(text.continue, 1);]
/ ontrialend = [trial.cond1.resetstimulusframes();]
/ inputdevice = keyboard
/ validresponse = (" ")
</trial>

Perfect, thank you so much!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search