Group: Forum Members
Posts: 13,
Visits: 53
|
Hello, looking for help with the following code. I want to use the drag and drop function but with pictures. This code worked previously with text but not with photos. I saw in another post that I have to insert each photo as a separate item for this to work however, I'm not sure how I will randomise the trials then. Would I have to insert each trial manually for each target?
<instruct> / fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1) / txcolor = (black) / screencolor = white / wait = 1000 </instruct>
<page intro> introuduction instructions ... </page>
<expt> / preinstructions = (intro) / blocks = [1=intervention] / postinstructions = (end) </expt>
<item glasstarget> /1 = "glass1.jpg" /2 = "glass2.jpg" /3 = "glass3.jpg" /4 = "glass4.jpg" /5 = "glass5.jpg" /6 = "glass6.jpg" </item>
<item papertarget> /1 = "paper1.jpg" /2 = "paper2.jpg" /3 = "paper3.jpg" /4 = "paper4.jpg" /5 = "paper5.jpg" /6 = "paper6.jpg" /7 = "paper7.jpg" /8 = "paper8.jpg" </item>
<item plastictarget> /1 = "plastic1.jpg" /2 = "plastic2.jpg" /3 = "plastic3.jpg" /4 = "plastic4.jpg" /5 = "plastic5.jpg" /6 = "plastic6.jpg" /7 = "plastic7.jpg" /8 = "plastic8.jpg" /9 = "plastic9.jpg" </item>
<item trashtarget> /1 = "trash1.jpg" </item>
<item organictarget> /1 = "organic1.jpg" /2 = "organic2.jpg" /3 = "organic3.png" /4 = "organic4.jpg" /5 = "organic5.jpg" /6 = "organic6.jpg" /7 = "organic7.jpg" /8 = "organic8.jpg" /9 = "organic9.jpg" </item>
<item distractor> /1 = "distractor1.jpg" /2 = "distractor2.jpg" /3 = "distractor3.jpg" /4 = "distractor4.jpg" /5 = "distractor5.jpg" </item>
<item glass> /1 = "GLASS.jpg" </item>
<item organic> /1 = "ORGANIC.jpg" </item>
<item paper> /1 = "PAPER.jpg" </item>
<item plastic> /1 = "PLASTIC.jpg" </item>
<item trash> /1 = "TRASH.jpg" </item>
<picture trashtarget> / items = trashtarget / size = (15%, 15%) / erase = false / droptarget = true </picture>
<picture glasstarget> / items = glasstarget / size = (15%, 15%) / erase = false / droptarget = true </picture>
<picture plastictarget> / items = plastictarget / size = (15%, 15%) / erase = false / droptarget = true </picture>
<picture papertarget> / items = papertarget / size = (15%, 15%) / erase = false / droptarget = true </picture>
<picture organictarget> / items = organictarget / size = (15%, 15%) / erase = false / droptarget = true </picture>
<picture distractor> / items = distractor / size = (15%, 15%) / erase = false / droptarget = true </picture>
<picture glass> / items = glass / position = (10%, 80%) / size = (15%, 15%) / erase = false / droptarget = true </picture>
<picture paper> / items = paper / position = (30%, 80%) / size = (15%, 15%) / erase = false / droptarget = true </picture>
<picture plastic> / items = plastic / position = (50%, 80%) / size = (15%, 15%) / erase = false / droptarget = true </picture>
<picture organic> / items = organic / position = (70%, 80%) / size = (15%, 15%) / erase = false / droptarget = true </picture>
<picture trash> / items = trash / position = (90%, 80%) / size = (15%, 15%) / erase = false / droptarget = true </picture>
<trial paper> / ontrialbegin = [ picture.papertarget.hposition = 50%; picture.papertarget.vposition = 50%; ] / stimulusframes = [1 = glass, paper, plastic, organic, trash, distractor] / inputdevice = dragdrop / showmousecursor = true / validresponse = (glass, paper, plastic, organic, trash, distractor) / correctresponse = (paper) </trial>
<trial plastic> / ontrialbegin = [ picture.plastictarget.hposition = 50%; picture.plastictarget.vposition = 50%; ] / stimulusframes = [1 = glass, paper, plastic, organic, trash, distractor] / inputdevice = dragdrop / showmousecursor = true / validresponse = (glass, paper, plastic, organic, trash, distractor) / correctresponse = (plastic) </trial>
<trial glass> / ontrialbegin = [ picture.glasstarget.hposition = 50%; picture.glasstarget.vposition = 50%; ] / stimulusframes = [1 = glass, paper, plastic, organic, trash, distractor] / inputdevice = dragdrop / showmousecursor = true / validresponse = (glass, paper, plastic, organic, trash, distractor) / correctresponse = (glass) </trial>
<trial organic> / ontrialbegin = [ picture.organictarget.hposition = 50%; picture.organictarget.vposition = 50%; ] / stimulusframes = [1 = glass, paper, plastic, organic, trash, distractor] / inputdevice = dragdrop / showmousecursor = true / validresponse = (glass, paper, plastic, organic, trash, distractor) / correctresponse = (organic) </trial>
<trial trash> / ontrialbegin = [ picture.trashtarget.hposition = 50%; picture.trashtarget.vposition = 50%; ] / stimulusframes = [1 = glass, paper, plastic, organic, trash, distractor] / inputdevice = dragdrop / showmousecursor = true / validresponse = (glass, paper, plastic, organic, trash, distractor) / correctresponse = (trash) </trial>
<trial distractor> / ontrialbegin = [ picture.distractor.hposition = 50%; picture.distractor.vposition = 50%; ] / stimulusframes = [1 = glass, paper, plastic, organic, trash, distractor] / inputdevice = dragdrop / showmousecursor = true / validresponse = (glass, paper, plastic, organic, trash, distractor) / correctresponse = () </trial>
<block intervention> /trials = [1-10 = replacenorepeat(glass, paper, plastic, organic, trash, distractor)] </block>
<page end> ..... end instructions </page>
|