Millisecond Forums

dragdrop expt

https://forums.millisecond.com/Topic25457.aspx

By scollin - 8/24/2018

Hello,

I am trying to create on experiment during which participants will sort images. I want them to do this by dragging and dropping them into either the red or the blue rectangle. See code below. Even though I'm using dragdrop and dropsource and droptarget, it does not seem to work. Any advice on what is wrong?

Once this works I also want to save in which rectangle a participant has placed each image, I guess I should save this by saving the position on the screen?



<shape bluecircle>
/ shape = rectangle
/ color = (0, 0, 200)
/ position = (80%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<shape redcircle>
/ shape = rectangle
/ color = (200, 0, 0)
/ position = (20%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<picture egg1>
/ items = ("egg1.png")
/ position = (10%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg6>
/ items = ("egg6.png")
/ position = (20%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg9>
/ items = ("egg9.png")
/ position = (30%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg10>
/ items = ("egg10.png")
/ position = (40%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg18>
/ items = ("egg18.png")
/ position = (50%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg19>
/ items = ("egg19.png")
/ position = (60%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg21>
/ items = ("egg21.png")
/ position = (70%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg41>
/ items = ("egg41.png")
/ position = (80%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>



<text finishtext>
/ items = ("time almost up!")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
/ size = (5%, 5%)
/ position = (0%, 0%)
</text>


<trial mytrial>
/ stimulustimes = [0=bluecircle; 0=redcircle; 0=egg1; 0=egg6; 0=egg9; 0=egg10; 0=egg18; 0=egg19; 0=egg21; 0=egg41; 10000 = finishtext]
/ showmousecursor = true
/ inputdevice = dragdrop
/ recorddata = true
/ response = anyresponse
/ responseinterrupt = trial
/ beginresponseframe = 0
</trial>

<block myblock>
/ trials=[1=mytrial]
</block>

<expt>
/ blocks=[1=myblock]
</expt>


By Dave - 8/24/2018

scollin - Friday, August 24, 2018
Hello,

I am trying to create on experiment during which participants will sort images. I want them to do this by dragging and dropping them into either the red or the blue rectangle. See code below. Even though I'm using dragdrop and dropsource and droptarget, it does not seem to work. Any advice on what is wrong?

Once this works I also want to save in which rectangle a participant has placed each image, I guess I should save this by saving the position on the screen?



<shape bluecircle>
/ shape = rectangle
/ color = (0, 0, 200)
/ position = (80%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<shape redcircle>
/ shape = rectangle
/ color = (200, 0, 0)
/ position = (20%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<picture egg1>
/ items = ("egg1.png")
/ position = (10%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg6>
/ items = ("egg6.png")
/ position = (20%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg9>
/ items = ("egg9.png")
/ position = (30%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg10>
/ items = ("egg10.png")
/ position = (40%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg18>
/ items = ("egg18.png")
/ position = (50%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg19>
/ items = ("egg19.png")
/ position = (60%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg21>
/ items = ("egg21.png")
/ position = (70%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg41>
/ items = ("egg41.png")
/ position = (80%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>



<text finishtext>
/ items = ("time almost up!")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
/ size = (5%, 5%)
/ position = (0%, 0%)
</text>


<trial mytrial>
/ stimulustimes = [0=bluecircle; 0=redcircle; 0=egg1; 0=egg6; 0=egg9; 0=egg10; 0=egg18; 0=egg19; 0=egg21; 0=egg41; 10000 = finishtext]
/ showmousecursor = true
/ inputdevice = dragdrop
/ recorddata = true
/ response = anyresponse
/ responseinterrupt = trial
/ beginresponseframe = 0
</trial>

<block myblock>
/ trials=[1=mytrial]
</block>

<expt>
/ blocks=[1=myblock]
</expt>



This example

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1) / txcolor = (white) / screencolor = black / wait = 1000 </instruct>

<page intro>
In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking1.jpg"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ droptarget = true
</text>

<picture smoking>
/ items = smoking
/ position = (50%, 10%)
/ size = (15%, 15%)
/ erase = false
/ droptarget = true
</picture>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (me) </trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (smoking) </trial>

<block intervention>
/trials = [1-68 = replacenorepeat(positive,negative)]
</block>

<page end>
You have reached the end of the task.
^^Thank you! Continue to enjoy being a non-smoking (or smoking less)!
</page>

as well as this thread here https://www.millisecond.com/forums/Topic24644.aspx should be useful with respect to setting up drag & drop mechanics properly.
By scollin - 8/26/2018

Dave - Friday, August 24, 2018
scollin - Friday, August 24, 2018
Hello,

I am trying to create on experiment during which participants will sort images. I want them to do this by dragging and dropping them into either the red or the blue rectangle. See code below. Even though I'm using dragdrop and dropsource and droptarget, it does not seem to work. Any advice on what is wrong?

Once this works I also want to save in which rectangle a participant has placed each image, I guess I should save this by saving the position on the screen?



<shape bluecircle>
/ shape = rectangle
/ color = (0, 0, 200)
/ position = (80%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<shape redcircle>
/ shape = rectangle
/ color = (200, 0, 0)
/ position = (20%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<picture egg1>
/ items = ("egg1.png")
/ position = (10%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg6>
/ items = ("egg6.png")
/ position = (20%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg9>
/ items = ("egg9.png")
/ position = (30%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg10>
/ items = ("egg10.png")
/ position = (40%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg18>
/ items = ("egg18.png")
/ position = (50%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg19>
/ items = ("egg19.png")
/ position = (60%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg21>
/ items = ("egg21.png")
/ position = (70%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg41>
/ items = ("egg41.png")
/ position = (80%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>



<text finishtext>
/ items = ("time almost up!")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
/ size = (5%, 5%)
/ position = (0%, 0%)
</text>


<trial mytrial>
/ stimulustimes = [0=bluecircle; 0=redcircle; 0=egg1; 0=egg6; 0=egg9; 0=egg10; 0=egg18; 0=egg19; 0=egg21; 0=egg41; 10000 = finishtext]
/ showmousecursor = true
/ inputdevice = dragdrop
/ recorddata = true
/ response = anyresponse
/ responseinterrupt = trial
/ beginresponseframe = 0
</trial>

<block myblock>
/ trials=[1=mytrial]
</block>

<expt>
/ blocks=[1=myblock]
</expt>



This example

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1) / txcolor = (white) / screencolor = black / wait = 1000 </instruct>

<page intro>
In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking1.jpg"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ droptarget = true
</text>

<picture smoking>
/ items = smoking
/ position = (50%, 10%)
/ size = (15%, 15%)
/ erase = false
/ droptarget = true
</picture>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (me) </trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (smoking) </trial>

<block intervention>
/trials = [1-68 = replacenorepeat(positive,negative)]
</block>

<page end>
You have reached the end of the task.
^^Thank you! Continue to enjoy being a non-smoking (or smoking less)!
</page>

as well as this thread here https://www.millisecond.com/forums/Topic24644.aspx should be useful with respect to setting up drag & drop mechanics properly.

Thanks a lot!
By scollin - 8/27/2018

Dave - Friday, August 24, 2018
scollin - Friday, August 24, 2018
Hello,

I am trying to create on experiment during which participants will sort images. I want them to do this by dragging and dropping them into either the red or the blue rectangle. See code below. Even though I'm using dragdrop and dropsource and droptarget, it does not seem to work. Any advice on what is wrong?

Once this works I also want to save in which rectangle a participant has placed each image, I guess I should save this by saving the position on the screen?



<shape bluecircle>
/ shape = rectangle
/ color = (0, 0, 200)
/ position = (80%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<shape redcircle>
/ shape = rectangle
/ color = (200, 0, 0)
/ position = (20%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<picture egg1>
/ items = ("egg1.png")
/ position = (10%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg6>
/ items = ("egg6.png")
/ position = (20%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg9>
/ items = ("egg9.png")
/ position = (30%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg10>
/ items = ("egg10.png")
/ position = (40%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg18>
/ items = ("egg18.png")
/ position = (50%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg19>
/ items = ("egg19.png")
/ position = (60%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg21>
/ items = ("egg21.png")
/ position = (70%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg41>
/ items = ("egg41.png")
/ position = (80%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>



<text finishtext>
/ items = ("time almost up!")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
/ size = (5%, 5%)
/ position = (0%, 0%)
</text>


<trial mytrial>
/ stimulustimes = [0=bluecircle; 0=redcircle; 0=egg1; 0=egg6; 0=egg9; 0=egg10; 0=egg18; 0=egg19; 0=egg21; 0=egg41; 10000 = finishtext]
/ showmousecursor = true
/ inputdevice = dragdrop
/ recorddata = true
/ response = anyresponse
/ responseinterrupt = trial
/ beginresponseframe = 0
</trial>

<block myblock>
/ trials=[1=mytrial]
</block>

<expt>
/ blocks=[1=myblock]
</expt>



This example

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1) / txcolor = (white) / screencolor = black / wait = 1000 </instruct>

<page intro>
In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking1.jpg"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ droptarget = true
</text>

<picture smoking>
/ items = smoking
/ position = (50%, 10%)
/ size = (15%, 15%)
/ erase = false
/ droptarget = true
</picture>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (me) </trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (smoking) </trial>

<block intervention>
/trials = [1-68 = replacenorepeat(positive,negative)]
</block>

<page end>
You have reached the end of the task.
^^Thank you! Continue to enjoy being a non-smoking (or smoking less)!
</page>

as well as this thread here https://www.millisecond.com/forums/Topic24644.aspx should be useful with respect to setting up drag & drop mechanics properly.


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)
By Dave - 8/27/2018

scollin - Monday, August 27, 2018


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Yes, that's possible. Taking the 1st example I posted here, you would do it like this:

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ screencolor = black
</instruct>

<page intro>
^In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<page end>
^This is the end.
</page>


<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<text smoking>
/ items = smoking
/ valign = bottom
/ halign = center
/ position = (50%, 10%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (me)
/ branch = [
    if(trial.positive.response != "end") list.triallist.nextvalue;
]
</trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (smoking)
/ branch = [
    if(trial.negative.response != "end") list.triallist.nextvalue;
]
</trial>

<block intervention>
/trials = [1 = list.triallist]
</block>

<list triallist>
/ items = (trial.positive, trial.negative)
/ poolsize = 10
</list>

<text end>
/ items = ("Click here to end the task.")
/ txbgcolor = black
/ txcolor = white
/ erase = false
/ vjustify = center
/ size = (24%, 6%)
/ position = (85%, 90%)
</text>

By abhi - 10/10/2018

Dave - Monday, August 27, 2018
scollin - Monday, August 27, 2018


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Yes, that's possible. Taking the 1st example I posted here, you would do it like this:

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ screencolor = black
</instruct>

<page intro>
^In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<page end>
^This is the end.
</page>


<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<text smoking>
/ items = smoking
/ valign = bottom
/ halign = center
/ position = (50%, 10%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (me)
/ branch = [
    if(trial.positive.response != "end") list.triallist.nextvalue;
]
</trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (smoking)
/ branch = [
    if(trial.negative.response != "end") list.triallist.nextvalue;
]
</trial>

<block intervention>
/trials = [1 = list.triallist]
</block>

<list triallist>
/ items = (trial.positive, trial.negative)
/ poolsize = 10
</list>

<text end>
/ items = ("Click here to end the task.")
/ txbgcolor = black
/ txcolor = white
/ erase = false
/ vjustify = center
/ size = (24%, 6%)
/ position = (85%, 90%)
</text>


Sorry for butting in here.
But this script will help me a lot in my new experiment. My query is that - at present in this script, participant has to drag only one of the positive / negative words. How to do it in a way that participant has to drag both positive and negative words on to targets before he/she is taken to next set of words.
Thanks
 Abhi
By Dave - 10/10/2018

abhi - Thursday, October 11, 2018
Dave - Monday, August 27, 2018
scollin - Monday, August 27, 2018


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Yes, that's possible. Taking the 1st example I posted here, you would do it like this:

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ screencolor = black
</instruct>

<page intro>
^In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<page end>
^This is the end.
</page>


<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<text smoking>
/ items = smoking
/ valign = bottom
/ halign = center
/ position = (50%, 10%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (me)
/ branch = [
    if(trial.positive.response != "end") list.triallist.nextvalue;
]
</trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (smoking)
/ branch = [
    if(trial.negative.response != "end") list.triallist.nextvalue;
]
</trial>

<block intervention>
/trials = [1 = list.triallist]
</block>

<list triallist>
/ items = (trial.positive, trial.negative)
/ poolsize = 10
</list>

<text end>
/ items = ("Click here to end the task.")
/ txbgcolor = black
/ txcolor = white
/ erase = false
/ vjustify = center
/ size = (24%, 6%)
/ position = (85%, 90%)
</text>


Sorry for butting in here.
But this script will help me a lot in my new experiment. My query is that - at present in this script, participant has to drag only one of the positive / negative words. How to do it in a way that participant has to drag both positive and negative words on to targets before he/she is taken to next set of words.
Thanks
 Abhi

You need to run two trials in sequence -- one for the 1st word the participant decides to drag to its position, followed by a second one for the 2nd word. Then start the next two-trial sequence for the next set of two words.
By abhi - 10/10/2018

Dave - Thursday, October 11, 2018
abhi - Thursday, October 11, 2018
Dave - Monday, August 27, 2018
scollin - Monday, August 27, 2018


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Yes, that's possible. Taking the 1st example I posted here, you would do it like this:

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ screencolor = black
</instruct>

<page intro>
^In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<page end>
^This is the end.
</page>


<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<text smoking>
/ items = smoking
/ valign = bottom
/ halign = center
/ position = (50%, 10%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (me)
/ branch = [
    if(trial.positive.response != "end") list.triallist.nextvalue;
]
</trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (smoking)
/ branch = [
    if(trial.negative.response != "end") list.triallist.nextvalue;
]
</trial>

<block intervention>
/trials = [1 = list.triallist]
</block>

<list triallist>
/ items = (trial.positive, trial.negative)
/ poolsize = 10
</list>

<text end>
/ items = ("Click here to end the task.")
/ txbgcolor = black
/ txcolor = white
/ erase = false
/ vjustify = center
/ size = (24%, 6%)
/ position = (85%, 90%)
</text>


Sorry for butting in here.
But this script will help me a lot in my new experiment. My query is that - at present in this script, participant has to drag only one of the positive / negative words. How to do it in a way that participant has to drag both positive and negative words on to targets before he/she is taken to next set of words.
Thanks
 Abhi

You need to run two trials in sequence -- one for the 1st word the participant decides to drag to its position, followed by a second one for the 2nd word. Then start the next two-trial sequence for the next set of two words.

Thanks Dave. Sorry not clear. How to ensure that the next trial is the same set of the words as the previous one ?
By Dave - 10/10/2018

abhi - Thursday, October 11, 2018
Dave - Thursday, October 11, 2018
abhi - Thursday, October 11, 2018
Dave - Monday, August 27, 2018
scollin - Monday, August 27, 2018


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Yes, that's possible. Taking the 1st example I posted here, you would do it like this:

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ screencolor = black
</instruct>

<page intro>
^In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<page end>
^This is the end.
</page>


<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<text smoking>
/ items = smoking
/ valign = bottom
/ halign = center
/ position = (50%, 10%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (me)
/ branch = [
    if(trial.positive.response != "end") list.triallist.nextvalue;
]
</trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (smoking)
/ branch = [
    if(trial.negative.response != "end") list.triallist.nextvalue;
]
</trial>

<block intervention>
/trials = [1 = list.triallist]
</block>

<list triallist>
/ items = (trial.positive, trial.negative)
/ poolsize = 10
</list>

<text end>
/ items = ("Click here to end the task.")
/ txbgcolor = black
/ txcolor = white
/ erase = false
/ vjustify = center
/ size = (24%, 6%)
/ position = (85%, 90%)
</text>


Sorry for butting in here.
But this script will help me a lot in my new experiment. My query is that - at present in this script, participant has to drag only one of the positive / negative words. How to do it in a way that participant has to drag both positive and negative words on to targets before he/she is taken to next set of words.
Thanks
 Abhi

You need to run two trials in sequence -- one for the 1st word the participant decides to drag to its position, followed by a second one for the 2nd word. Then start the next two-trial sequence for the next set of two words.

Thanks Dave. Sorry not clear. How to ensure that the next trial is the same set of the words as the previous one ?

Something along the following lines:

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<trial first>
/ ontrialbegin = [
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
  text.positive.hposition = 30%;
  text.positive.vposition = 50%;
text.negative.hposition = 70%;
  text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
</trial>

<trial second>
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>
By abhi - 10/12/2018

Dave - Thursday, October 11, 2018
abhi - Thursday, October 11, 2018
Dave - Thursday, October 11, 2018
abhi - Thursday, October 11, 2018
Dave - Monday, August 27, 2018
scollin - Monday, August 27, 2018


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Yes, that's possible. Taking the 1st example I posted here, you would do it like this:

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ screencolor = black
</instruct>

<page intro>
^In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<page end>
^This is the end.
</page>


<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<text smoking>
/ items = smoking
/ valign = bottom
/ halign = center
/ position = (50%, 10%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (me)
/ branch = [
    if(trial.positive.response != "end") list.triallist.nextvalue;
]
</trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (smoking)
/ branch = [
    if(trial.negative.response != "end") list.triallist.nextvalue;
]
</trial>

<block intervention>
/trials = [1 = list.triallist]
</block>

<list triallist>
/ items = (trial.positive, trial.negative)
/ poolsize = 10
</list>

<text end>
/ items = ("Click here to end the task.")
/ txbgcolor = black
/ txcolor = white
/ erase = false
/ vjustify = center
/ size = (24%, 6%)
/ position = (85%, 90%)
</text>


Sorry for butting in here.
But this script will help me a lot in my new experiment. My query is that - at present in this script, participant has to drag only one of the positive / negative words. How to do it in a way that participant has to drag both positive and negative words on to targets before he/she is taken to next set of words.
Thanks
 Abhi

You need to run two trials in sequence -- one for the 1st word the participant decides to drag to its position, followed by a second one for the 2nd word. Then start the next two-trial sequence for the next set of two words.

Thanks Dave. Sorry not clear. How to ensure that the next trial is the same set of the words as the previous one ?

Something along the following lines:

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<trial first>
/ ontrialbegin = [
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
  text.positive.hposition = 30%;
  text.positive.vposition = 50%;
text.negative.hposition = 70%;
  text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
</trial>

<trial second>
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

Thanks for this Dave. Working perfect.

I still have'nt understood the 'value function' so far. That's the key, I think.

One last thing- In this script participant cannot undo the decision of drag /drop. i.e., if he/she changes his/her mind after dragging, that can't be done. What is the command for that ?  Thanks.



By Dave - 10/14/2018

abhi - Saturday, October 13, 2018
Dave - Thursday, October 11, 2018
abhi - Thursday, October 11, 2018
Dave - Thursday, October 11, 2018
abhi - Thursday, October 11, 2018
Dave - Monday, August 27, 2018
scollin - Monday, August 27, 2018


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Yes, that's possible. Taking the 1st example I posted here, you would do it like this:

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ screencolor = black
</instruct>

<page intro>
^In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<page end>
^This is the end.
</page>


<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<text smoking>
/ items = smoking
/ valign = bottom
/ halign = center
/ position = (50%, 10%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (me)
/ branch = [
    if(trial.positive.response != "end") list.triallist.nextvalue;
]
</trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (smoking)
/ branch = [
    if(trial.negative.response != "end") list.triallist.nextvalue;
]
</trial>

<block intervention>
/trials = [1 = list.triallist]
</block>

<list triallist>
/ items = (trial.positive, trial.negative)
/ poolsize = 10
</list>

<text end>
/ items = ("Click here to end the task.")
/ txbgcolor = black
/ txcolor = white
/ erase = false
/ vjustify = center
/ size = (24%, 6%)
/ position = (85%, 90%)
</text>


Sorry for butting in here.
But this script will help me a lot in my new experiment. My query is that - at present in this script, participant has to drag only one of the positive / negative words. How to do it in a way that participant has to drag both positive and negative words on to targets before he/she is taken to next set of words.
Thanks
 Abhi

You need to run two trials in sequence -- one for the 1st word the participant decides to drag to its position, followed by a second one for the 2nd word. Then start the next two-trial sequence for the next set of two words.

Thanks Dave. Sorry not clear. How to ensure that the next trial is the same set of the words as the previous one ?

Something along the following lines:

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<trial first>
/ ontrialbegin = [
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
  text.positive.hposition = 30%;
  text.positive.vposition = 50%;
text.negative.hposition = 70%;
  text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
</trial>

<trial second>
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

Thanks for this Dave. Working perfect.

I still have'nt understood the 'value function' so far. That's the key, I think.

One last thing- In this script participant cannot undo the decision of drag /drop. i.e., if he/she changes his/her mind after dragging, that can't be done. What is the command for that ?  Thanks.




If you want participants to be able to revise their decisions, you need to make sure the droptarget and dropsource properties get set back to true. You'll probably also want to introduce some additional response that allows participants to either reset the whole round to its initial state, or at least allows them to indicate when they're done, i.e. happy with their decision and ready to submit it.

Something like this, for example:

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>



<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]

/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]

</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>
By abhi - 10/21/2018

Dave - Monday, October 15, 2018
abhi - Saturday, October 13, 2018
Dave - Thursday, October 11, 2018
abhi - Thursday, October 11, 2018
Dave - Thursday, October 11, 2018
abhi - Thursday, October 11, 2018
Dave - Monday, August 27, 2018
scollin - Monday, August 27, 2018


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Yes, that's possible. Taking the 1st example I posted here, you would do it like this:

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ screencolor = black
</instruct>

<page intro>
^In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<page end>
^This is the end.
</page>


<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<text smoking>
/ items = smoking
/ valign = bottom
/ halign = center
/ position = (50%, 10%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (me)
/ branch = [
    if(trial.positive.response != "end") list.triallist.nextvalue;
]
</trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (smoking)
/ branch = [
    if(trial.negative.response != "end") list.triallist.nextvalue;
]
</trial>

<block intervention>
/trials = [1 = list.triallist]
</block>

<list triallist>
/ items = (trial.positive, trial.negative)
/ poolsize = 10
</list>

<text end>
/ items = ("Click here to end the task.")
/ txbgcolor = black
/ txcolor = white
/ erase = false
/ vjustify = center
/ size = (24%, 6%)
/ position = (85%, 90%)
</text>


Sorry for butting in here.
But this script will help me a lot in my new experiment. My query is that - at present in this script, participant has to drag only one of the positive / negative words. How to do it in a way that participant has to drag both positive and negative words on to targets before he/she is taken to next set of words.
Thanks
 Abhi

You need to run two trials in sequence -- one for the 1st word the participant decides to drag to its position, followed by a second one for the 2nd word. Then start the next two-trial sequence for the next set of two words.

Thanks Dave. Sorry not clear. How to ensure that the next trial is the same set of the words as the previous one ?

Something along the following lines:

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<trial first>
/ ontrialbegin = [
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
  text.positive.hposition = 30%;
  text.positive.vposition = 50%;
text.negative.hposition = 70%;
  text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
</trial>

<trial second>
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

Thanks for this Dave. Working perfect.

I still have'nt understood the 'value function' so far. That's the key, I think.

One last thing- In this script participant cannot undo the decision of drag /drop. i.e., if he/she changes his/her mind after dragging, that can't be done. What is the command for that ?  Thanks.




If you want participants to be able to revise their decisions, you need to make sure the droptarget and dropsource properties get set back to true. You'll probably also want to introduce some additional response that allows participants to either reset the whole round to its initial state, or at least allows them to indicate when they're done, i.e. happy with their decision and ready to submit it.

Something like this, for example:

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>



<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]

/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]

</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

Got it.

All working as I wanted. Thanks a lot.
By abhi - 11/23/2018

Dave - Monday, October 15, 2018
abhi - Saturday, October 13, 2018
Dave - Thursday, October 11, 2018
abhi - Thursday, October 11, 2018
Dave - Thursday, October 11, 2018
abhi - Thursday, October 11, 2018
Dave - Monday, August 27, 2018
scollin - Monday, August 27, 2018


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Yes, that's possible. Taking the 1st example I posted here, you would do it like this:

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ screencolor = black
</instruct>

<page intro>
^In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<page end>
^This is the end.
</page>


<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<text smoking>
/ items = smoking
/ valign = bottom
/ halign = center
/ position = (50%, 10%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (me)
/ branch = [
    if(trial.positive.response != "end") list.triallist.nextvalue;
]
</trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (smoking)
/ branch = [
    if(trial.negative.response != "end") list.triallist.nextvalue;
]
</trial>

<block intervention>
/trials = [1 = list.triallist]
</block>

<list triallist>
/ items = (trial.positive, trial.negative)
/ poolsize = 10
</list>

<text end>
/ items = ("Click here to end the task.")
/ txbgcolor = black
/ txcolor = white
/ erase = false
/ vjustify = center
/ size = (24%, 6%)
/ position = (85%, 90%)
</text>


Sorry for butting in here.
But this script will help me a lot in my new experiment. My query is that - at present in this script, participant has to drag only one of the positive / negative words. How to do it in a way that participant has to drag both positive and negative words on to targets before he/she is taken to next set of words.
Thanks
 Abhi

You need to run two trials in sequence -- one for the 1st word the participant decides to drag to its position, followed by a second one for the 2nd word. Then start the next two-trial sequence for the next set of two words.

Thanks Dave. Sorry not clear. How to ensure that the next trial is the same set of the words as the previous one ?

Something along the following lines:

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<trial first>
/ ontrialbegin = [
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
  text.positive.hposition = 30%;
  text.positive.vposition = 50%;
text.negative.hposition = 70%;
  text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
</trial>

<trial second>
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

Thanks for this Dave. Working perfect.

I still have'nt understood the 'value function' so far. That's the key, I think.

One last thing- In this script participant cannot undo the decision of drag /drop. i.e., if he/she changes his/her mind after dragging, that can't be done. What is the command for that ?  Thanks.




If you want participants to be able to revise their decisions, you need to make sure the droptarget and dropsource properties get set back to true. You'll probably also want to introduce some additional response that allows participants to either reset the whole round to its initial state, or at least allows them to indicate when they're done, i.e. happy with their decision and ready to submit it.

Something like this, for example:

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>



<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]

/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]

</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi
By Dave - 11/25/2018

abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>

By abhi - 11/26/2018

Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Thanks Dave.
One thing is still there in data. In many rows (monkey data), it show the same response for both trials (trial.first.response = me and trial.second.response = me)

By abhi - 11/26/2018

abhi - Monday, November 26, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Thanks Dave.
One thing is still there in data. In many rows (monkey data), it show the same response for both trials (trial.first.response = me and trial.second.response = me)

Sorry. missed out on your repsonse about monkey. I will try it out manually.

Thanks.
By abhi - 11/28/2018

Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>



By Dave - 11/28/2018

abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
By abhi - 11/29/2018

abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
Sorry about that,
Here it is. Basically I just want to couterbalance the positions of droptarget and dropsouce between subjects

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<block myblock2>
/trials = [1-10 = third]
</block>

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>




<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>



By Dave - 11/29/2018

abhi - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
Sorry about that,
Here it is. Basically I just want to couterbalance the positions of droptarget and dropsouce between subjects

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<block myblock2>
/trials = [1-10 = third]
</block>

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>




<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




If you wish to counterbalance *between* subjects, then this

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>

is wrong. The above administers 10 instances of  "myblock"  (running trial.first and trial.second) and 10 instances of  "myblock2" (running trial.third and trial.fourth) to each participant, i.e. this would be *within* subjects.

For a between-manipulation, you would specify

<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock]
</expt>

<expt>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock2]
</expt>

where participants assigned an odd group ID (1,3,5, ...) would get 20 instances of "myblock" and
participants assigned an even group ID (2,4,6, ...) would get 20 instances of "myblock2".
By abhi - 11/29/2018

Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
Sorry about that,
Here it is. Basically I just want to couterbalance the positions of droptarget and dropsouce between subjects

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<block myblock2>
/trials = [1-10 = third]
</block>

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>




<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




If you wish to counterbalance *between* subjects, then this

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>

is wrong. The above administers 10 instances of  "myblock"  (running trial.first and trial.second) and 10 instances of  "myblock2" (running trial.third and trial.fourth) to each participant, i.e. this would be *within* subjects.

For a between-manipulation, you would specify

<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock]
</expt>

<expt>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock2]
</expt>

where participants assigned an odd group ID (1,3,5, ...) would get 20 instances of "myblock" and
participants assigned an even group ID (2,4,6, ...) would get 20 instances of "myblock2".

Hi,

So in myblock2 I have used ‘postive2/negative2’ where I have reversed the positions of these elements (within subjects). So, each subjects is being shown positive items on (30%, 80%) and (70%,80%) in half of the trials.

But I am not able to get the data element properly. With this ‘data’ command, data is being recorded for all columns, even if it is not there (for e.g., for first/second trials, the columns of third/fourth trials should be blank but it is not blank. Similarly, when ‘positive/negative’ items are shown, the columns of ‘positive2/negative2’ should be blank, but they are not blank. Is this data command wrong?
Thanks




By Dave - 11/29/2018

abhi - Thursday, November 29, 2018
Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
Sorry about that,
Here it is. Basically I just want to couterbalance the positions of droptarget and dropsouce between subjects

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<block myblock2>
/trials = [1-10 = third]
</block>

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>




<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




If you wish to counterbalance *between* subjects, then this

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>

is wrong. The above administers 10 instances of  "myblock"  (running trial.first and trial.second) and 10 instances of  "myblock2" (running trial.third and trial.fourth) to each participant, i.e. this would be *within* subjects.

For a between-manipulation, you would specify

<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock]
</expt>

<expt>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock2]
</expt>

where participants assigned an odd group ID (1,3,5, ...) would get 20 instances of "myblock" and
participants assigned an even group ID (2,4,6, ...) would get 20 instances of "myblock2".

Hi,

So in myblock2 I have used ‘postive2/negative2’ where I have reversed the positions of these elements (within subjects). So, each subjects is being shown positive items on (30%, 80%) and (70%,80%) in half of the trials.

But I am not able to get the data element properly. With this ‘data’ command, data is being recorded for all columns, even if it is not there (for e.g., for first/second trials, the columns of third/fourth trials should be blank but it is not blank. Similarly, when ‘positive/negative’ items are shown, the columns of ‘positive2/negative2’ should be blank, but they are not blank. Is this data command wrong?
Thanks





No, it's not wrong, that's the expected behavior. You're logging properties. Suppose the experiment starts with one instance of trial.first/trial.second. Then there'll be a row in the data file, that reflects the response properties of trial.first and trial.second, but the column for trial.third.response and trial.fourth.response will be blank since *no instances of trial.third and trial.fourth* have been run at this point, and there is nothing those properties could reflect.

Now suppose, there's an instance of trial.third/trial.fourth next. Then you'll have values for the trial.third.response and trial.fourth.response properties in that row, reflecting the responses given. BUT, of course, there'll also be values in the trial.first.response and trial.second.response columns -- an instance of trial.first and trial.second ran before that so those properties have values as they should. Those columns should in fact NOT be blank, they do and should reflect the value they *currently* have until that value changes.
By abhi - 11/30/2018

Dave - Friday, November 30, 2018
abhi - Thursday, November 29, 2018
Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
Sorry about that,
Here it is. Basically I just want to couterbalance the positions of droptarget and dropsouce between subjects

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<block myblock2>
/trials = [1-10 = third]
</block>

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>




<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




If you wish to counterbalance *between* subjects, then this

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>

is wrong. The above administers 10 instances of  "myblock"  (running trial.first and trial.second) and 10 instances of  "myblock2" (running trial.third and trial.fourth) to each participant, i.e. this would be *within* subjects.

For a between-manipulation, you would specify

<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock]
</expt>

<expt>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock2]
</expt>

where participants assigned an odd group ID (1,3,5, ...) would get 20 instances of "myblock" and
participants assigned an even group ID (2,4,6, ...) would get 20 instances of "myblock2".

Hi,

So in myblock2 I have used ‘postive2/negative2’ where I have reversed the positions of these elements (within subjects). So, each subjects is being shown positive items on (30%, 80%) and (70%,80%) in half of the trials.

But I am not able to get the data element properly. With this ‘data’ command, data is being recorded for all columns, even if it is not there (for e.g., for first/second trials, the columns of third/fourth trials should be blank but it is not blank. Similarly, when ‘positive/negative’ items are shown, the columns of ‘positive2/negative2’ should be blank, but they are not blank. Is this data command wrong?
Thanks





No, it's not wrong, that's the expected behavior. You're logging properties. Suppose the experiment starts with one instance of trial.first/trial.second. Then there'll be a row in the data file, that reflects the response properties of trial.first and trial.second, but the column for trial.third.response and trial.fourth.response will be blank since *no instances of trial.third and trial.fourth* have been run at this point, and there is nothing those properties could reflect.

Now suppose, there's an instance of trial.third/trial.fourth next. Then you'll have values for the trial.third.response and trial.fourth.response properties in that row, reflecting the responses given. BUT, of course, there'll also be values in the trial.first.response and trial.second.response columns -- an instance of trial.first and trial.second ran before that so those properties have values as they should. Those columns should in fact NOT be blank, they do and should reflect the value they *currently* have until that value changes.
Hi Dave,

Thanks.

Is there an easy way to sort out the rows to identify first/third trials? Something  like, ‘1 for text entry’ and ‘0 for no entry /repeat’; Something which can be easily filtered out later to identify first/third trials.

Thanks


By Dave - 11/30/2018

abhi - Friday, November 30, 2018
Dave - Friday, November 30, 2018
abhi - Thursday, November 29, 2018
Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
Sorry about that,
Here it is. Basically I just want to couterbalance the positions of droptarget and dropsouce between subjects

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<block myblock2>
/trials = [1-10 = third]
</block>

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>




<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




If you wish to counterbalance *between* subjects, then this

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>

is wrong. The above administers 10 instances of  "myblock"  (running trial.first and trial.second) and 10 instances of  "myblock2" (running trial.third and trial.fourth) to each participant, i.e. this would be *within* subjects.

For a between-manipulation, you would specify

<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock]
</expt>

<expt>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock2]
</expt>

where participants assigned an odd group ID (1,3,5, ...) would get 20 instances of "myblock" and
participants assigned an even group ID (2,4,6, ...) would get 20 instances of "myblock2".

Hi,

So in myblock2 I have used ‘postive2/negative2’ where I have reversed the positions of these elements (within subjects). So, each subjects is being shown positive items on (30%, 80%) and (70%,80%) in half of the trials.

But I am not able to get the data element properly. With this ‘data’ command, data is being recorded for all columns, even if it is not there (for e.g., for first/second trials, the columns of third/fourth trials should be blank but it is not blank. Similarly, when ‘positive/negative’ items are shown, the columns of ‘positive2/negative2’ should be blank, but they are not blank. Is this data command wrong?
Thanks





No, it's not wrong, that's the expected behavior. You're logging properties. Suppose the experiment starts with one instance of trial.first/trial.second. Then there'll be a row in the data file, that reflects the response properties of trial.first and trial.second, but the column for trial.third.response and trial.fourth.response will be blank since *no instances of trial.third and trial.fourth* have been run at this point, and there is nothing those properties could reflect.

Now suppose, there's an instance of trial.third/trial.fourth next. Then you'll have values for the trial.third.response and trial.fourth.response properties in that row, reflecting the responses given. BUT, of course, there'll also be values in the trial.first.response and trial.second.response columns -- an instance of trial.first and trial.second ran before that so those properties have values as they should. Those columns should in fact NOT be blank, they do and should reflect the value they *currently* have until that value changes.
Hi Dave,

Thanks.

Is there an easy way to sort out the rows to identify first/third trials? Something  like, ‘1 for text entry’ and ‘0 for no entry /repeat’; Something which can be easily filtered out later to identify first/third trials.

Thanks



You have that information already in the blockcode column. Whenever the blockcode indicates "myblock", you know that only first/second trials were run in that block, anything logged in the third/fourth trial columns is irrelevant for that block. Conversely, whenever the blockcode is "myblock2", you know that only third/fourth trials were administered during that block, and anything logged in th first/second trial columns is irrelevant for that block.

If you want to clean up your data further, you can use <values>. If, ultimately, you want to run some kind of mixed blocks, and can't use the blockcode column to identify trial type, do something like this:

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ trialtype = ""
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
values.trialtype = "first/second";
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = noreplace(first, third)]
</block>

<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
values.trialtype = "third/fourth";
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
values.trialtype
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>
By abhi - 12/5/2018

Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
Sorry about that,
Here it is. Basically I just want to couterbalance the positions of droptarget and dropsouce between subjects

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<block myblock2>
/trials = [1-10 = third]
</block>

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>




<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




If you wish to counterbalance *between* subjects, then this

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>

is wrong. The above administers 10 instances of  "myblock"  (running trial.first and trial.second) and 10 instances of  "myblock2" (running trial.third and trial.fourth) to each participant, i.e. this would be *within* subjects.

For a between-manipulation, you would specify

<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock]
</expt>

<expt>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock2]
</expt>

where participants assigned an odd group ID (1,3,5, ...) would get 20 instances of "myblock" and
participants assigned an even group ID (2,4,6, ...) would get 20 instances of "myblock2".

Thanks for this Dave. Working superb.

I noticed that at the time of launch there is an option to show participants a random confirmation code by millisecond. How to capture that code in the data element. Is there a documentation about confirmation code in the Help section.

Thanks

By Dave - 12/5/2018

abhi - Thursday, December 6, 2018
Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
Sorry about that,
Here it is. Basically I just want to couterbalance the positions of droptarget and dropsouce between subjects

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<block myblock2>
/trials = [1-10 = third]
</block>

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>




<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




If you wish to counterbalance *between* subjects, then this

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>

is wrong. The above administers 10 instances of  "myblock"  (running trial.first and trial.second) and 10 instances of  "myblock2" (running trial.third and trial.fourth) to each participant, i.e. this would be *within* subjects.

For a between-manipulation, you would specify

<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock]
</expt>

<expt>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock2]
</expt>

where participants assigned an odd group ID (1,3,5, ...) would get 20 instances of "myblock" and
participants assigned an even group ID (2,4,6, ...) would get 20 instances of "myblock2".

Thanks for this Dave. Working superb.

I noticed that at the time of launch there is an option to show participants a random confirmation code by millisecond. How to capture that code in the data element. Is there a documentation about confirmation code in the Help section.

Thanks


The confirmation code is just the subject ID, it's logged in the data file already in the subject column.
By abhi - 12/18/2018

Dave - Thursday, December 6, 2018
abhi - Thursday, December 6, 2018
Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
Sorry about that,
Here it is. Basically I just want to couterbalance the positions of droptarget and dropsouce between subjects

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<block myblock2>
/trials = [1-10 = third]
</block>

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>




<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




If you wish to counterbalance *between* subjects, then this

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>

is wrong. The above administers 10 instances of  "myblock"  (running trial.first and trial.second) and 10 instances of  "myblock2" (running trial.third and trial.fourth) to each participant, i.e. this would be *within* subjects.

For a between-manipulation, you would specify

<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock]
</expt>

<expt>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock2]
</expt>

where participants assigned an odd group ID (1,3,5, ...) would get 20 instances of "myblock" and
participants assigned an even group ID (2,4,6, ...) would get 20 instances of "myblock2".

Thanks for this Dave. Working superb.

I noticed that at the time of launch there is an option to show participants a random confirmation code by millisecond. How to capture that code in the data element. Is there a documentation about confirmation code in the Help section.

Thanks


The confirmation code is just the subject ID, it's logged in the data file already in the subject column.

Hi, Just noticed that even if someone aborts the expt, still he/she gets the confirmation code. Anyway to stop that.
Thanks.
By Dave - 12/18/2018

abhi - Wednesday, December 19, 2018
Dave - Thursday, December 6, 2018
abhi - Thursday, December 6, 2018
Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




Dave - Thursday, November 29, 2018
abhi - Thursday, November 29, 2018
Dave - Monday, November 26, 2018
abhi - Saturday, November 24, 2018
Hi Dave,
This is working fine. But I noticed that the data is messy (I tried only test monkey).

Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

Thanks
Abhi

> Firstly, ‘Reset’ is also recorded. It will pile up to big chunk in case there are 100 respondents. Is there a way not to record the ‘reset’ data in case someone resets the trials?

You can set the trials to /recorddata=false and only /branch to a separate <trial> that records the data of interest when the participant responds "done".

> Secondly, although, when I try the expt. manually, I can’t drop the same target onto the same source (seems impossible). But data from test monkey shows many responses as same for the first and second trials (i.e. ‘me’and ‘me’ as responses in data for both first and second trials).

This is normal; It's an artifact of how the monkey works and doesn't indicate anything wrong with the code. In essence, all the monkey does is select one of the options listed in /validresponse at random.

> Thirdly, data doesn’t show which item/text/word  was drooped over droptargets (e.g., ‘refreshed’,‘clogged arteries’ etc.). I tried ‘Stimulusitem’ in column, but it shows only the stimulus items shown on the screen but not specifically which ‘text/item/word’was dragged over which target.  Is there a way to find that?

You can build some /ontrialend logic that reads the dragged elements' position. That would tell you which stimulus / item was dragged where.


<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.positem
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 95%)
</text>

<text smoking>
/ items = smoking
/ valign = top
/ halign = center
/ position = (50%, 5%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ erase = false
/ droptarget = true
/ dropposition = (50%, 5%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (90%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 50%;
text.negative.hposition = 70%;
text.negative.vposition = 50%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 50%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 50%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<expt>
/ blocks = [1=myblock]
</expt>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
text.negative.currentitem text.negative.vposition
text.positive.currentitem text.positive.vposition)
/ separatefiles = true
</data>


Hi,

In this I want to counterbalance the positon of 'source and target' and so created two additional trials - 'third and fourth' with 'me2 & smoking2' and 'positive2& negative2' (at different positions).
For data I used the following. But  does'nt work. Data shows responses in all colummns. For e.g., in first and second trials, it shows entry for third and fourth trials also (when only first and second trials were played). Is something wrong here?

Thanks

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




I'm not sure how I'm supposed to answer that without the actual code.
Sorry about that,
Here it is. Basically I just want to couterbalance the positions of droptarget and dropsouce between subjects

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative>
/ items = negative
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<list negitemnumbers>
/ poolsize = 10
</list>

<list positemnumbers>
/ poolsize = 10
</list>

<values>
/ negitem = 1
/ positem = 1
/ reset = false
</values>


<text me>
/ items = me
/ position = (30%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (30%, 30%)
</text>

<text smoking>
/ items = smoking
/ position = (70%, 30%)
/ txcolor = black
/ fontstyle = ("Arial", 5%)
/ erase = false
/ droptarget = true
/ dropposition = (70%, 30%)
</text>

<text reset>
/ items = ("RESET")
/ size = (5%, 3%)
/ vjustify = center
/ txbgcolor = grey
/ position = (50%, 90%)
</text>


<trial first>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive.hposition = 30%;
text.positive.vposition = 80%;
text.negative.hposition = 70%;
text.negative.vposition = 80%;
text.positive.dropsource = true;
text.negative.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.first.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.first.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.second
]
/ recorddata = false
</trial>

<trial second>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive.vposition != 80%)
text.positive.dropsource = false;
]
/ ontrialbegin = [
if (text.negative.vposition != 80%)
text.negative.dropsource = false;
]
/ stimulusframes = [1 = positive, negative, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.second.response == "reset"){
values.reset = true;
trial.first;
};
]
/ branch = [
if (trial.second.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<trial record_round>
/ trialduration = 0
/ validresponse = (0)
/ recorddata = true
</trial>

<block myblock>
/trials = [1-10 = first]
</block>

<block myblock2>
/trials = [1-10 = third]
</block>

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>




<trial third>
/ ontrialbegin = [
if (!values.reset) {
values.positem = list.positemnumbers.nextindex;
values.negitem = list.negitemnumbers.nextindex;
};
]
/ ontrialbegin = [
text.positive2.hposition = 30%;
text.positive2.vposition = 80%;
text.negative2.hposition = 70%;
text.negative2.vposition = 80%;
text.positive2.dropsource = true;
text.negative2.dropsource = true;
text.me.droptarget = true;
text.smoking.droptarget = true;
]
/ ontrialend = [
if (trial.third.response == "me")
text.me.droptarget = false;
]
/ ontrialend = [
if (trial.third.response == "smoking")
text.smoking.droptarget = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking)
/ branch = [
trial.fourth
]
/ recorddata = false
</trial>

<trial fourth>
/ ontrialbegin = [
values.reset = false;
]
/ ontrialbegin = [
if (text.positive2.vposition != 80%)
text.positive2.dropsource = false;
]
/ ontrialbegin = [
if (text.negative2.vposition != 80%)
text.negative2.dropsource = false;
]
/ stimulusframes = [1 = positive2, negative2, me, smoking, reset]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, reset)
/ branch = [
if (trial.fourth.response == "reset"){
values.reset = true;
trial.third;
};
]
/ branch = [
if (trial.fourth.response != "reset"){
trial.record_round;
}
]
/ recorddata = false
</trial>

<item negative2>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
</item>

<item positive2>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
</item>

<text positive2>
/ items = positive2
/ position = (70%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.positem
</text>


<text negative2>
/ items = negative2
/ position = (30%, 80%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
/ dropsource = true
/ select = values.negitem
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode
trial.first.response trial.first.latency
trial.second.response trial.second.latency
trial.third.response trial.third.latency
trial.fourth.response trial.fourth.latency
text.negative.currentitem text.negative.hposition text.negative.vposition
text.positive.currentitem text.positive.hposition text.positive.vposition
text.negative2.currentitem text.negative2.hposition text.negative2.vposition
text.positive2.currentitem text.positive2.hposition text.positive2.vposition )
/ separatefiles = true
</data>




If you wish to counterbalance *between* subjects, then this

<expt>
/ blocks = [1-20 = random (myblock,myblock2)]
</expt>

is wrong. The above administers 10 instances of  "myblock"  (running trial.first and trial.second) and 10 instances of  "myblock2" (running trial.third and trial.fourth) to each participant, i.e. this would be *within* subjects.

For a between-manipulation, you would specify

<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock]
</expt>

<expt>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/ blocks = [1-20 = myblock2]
</expt>

where participants assigned an odd group ID (1,3,5, ...) would get 20 instances of "myblock" and
participants assigned an even group ID (2,4,6, ...) would get 20 instances of "myblock2".

Thanks for this Dave. Working superb.

I noticed that at the time of launch there is an option to show participants a random confirmation code by millisecond. How to capture that code in the data element. Is there a documentation about confirmation code in the Help section.

Thanks


The confirmation code is just the subject ID, it's logged in the data file already in the subject column.

Hi, Just noticed that even if someone aborts the expt, still he/she gets the confirmation code. Anyway to stop that.
Thanks.

No, not really.
By mongrel - 6/17/2019

Hi Dave,

I tried to fix my problem by reading this thread, but I wasn't successful so far. I want participants to rank certain words (presented as pictures) by dragging and dropping them into rectangular shapes. Here is my (quick n dirty) script so far:
ITEMS

<item energy>
/1 = "Energie.png"
</item>

<item health>
/1 = "Gesundheit.png"
</item>

<item weight>
/1 = "Gewicht.png"
</item>

<item bodystrength>
/1 = "Körperkraft.png"
</item>

<item bodyattr>
/1 = "Körperliche Attraktivität.png"
</item>

<item bodyfit>
/1= "Körperliche Fitness.png"
</item>

<item bodymeas>
/1 = "Körpermaße z.B. Brust Taille Hüfte.png"
</item>

<item coordination>
/1 = "Physische Koordination.png"
</item>

<item sexappeal>
/1 = "Sex-Appeal.png"
</item>

<item vismusbody>
/1 = "Sichtbar muskulöser Körper.png"
</item>

PICTURES

<picture energy>
/items = energy
/size = (7%, 7%)
/position = (5%,5%)
/ dropsource = true
</picture>

<picture health>
/items = health
/size = (6%, 6%)
/ position = (5%,10%)
/ dropsource = true
</picture>

<picture weight>
/items = weight
/size = (6%, 6%)
/ position = (5%,15%)
/ dropsource = true
</picture>

<picture bodystrength>
/items = bodystrength
/size = (6%, 6%)
/ position = (5%,20%)
/ dropsource = true
</picture>

<picture bodyattr>
/items = bodyattr
/size = (6%, 6%)
/ position = (5%,25%)
/ dropsource = true
</picture>

<picture bodyfit>
/items= bodyfit
/size = (6%, 6%)
/ position = (5%,30%)
/ dropsource = true
</picture>

<picture bodymeas>
/items = bodymeas
/size = (6%, 6%)
/ position = (5%,35%)
/ dropsource = true
</picture>

<picture coordination>
/items = coordination
/size = (6%, 6%)
/position = (5%,40%)
/ dropsource = true
</picture>

<picture sexappeal>
/items = sexappeal
/size = (6%, 6%)
/position = (5%,45%)
/ dropsource = true
</picture>

<picture vismusbody>
/items = vismusbody
/size = (6%, 6%)
/position = (5%,50%)
/ dropsource = true
</picture>

SHAPES

<shape drop1>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 5%)
</shape>


<shape drop2>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 15%)
</shape>


<shape drop3>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 25%)
</shape>


<shape drop4>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop5>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop6>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 45%)
</shape>


<shape drop7>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 55%)
</shape>


<shape drop8>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 65%)
</shape>


<shape drop9>
/ shape = rectangle
/ size = (10%, 15%)
/color = white
/ droptarget = true
/ position = (80%, 75%)
</shape>


<shape drop10>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 85%)
</shape>

<trial SOQ>
/ stimulusframes = [1 = drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10, energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight,health ]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight, health)
</trial>

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

<expt SOQ>
/ blocks = [1=SOQ]
</expt>



My questions are:
1. I cannot seem to manage that the rectangle has a frame to make it visible. How can I do that?
2. The Dragndrop does not work, what am I doing wrong?

I know, I could probably find the answers in the ToL script or the other one that you posted, but for some reason I cannot apply those scripts to my needs. Sorry, if I miss the obvious here...

Thank you in advance!
M.


By Dave - 6/17/2019

mongrel - 6/18/2019
Hi Dave,

I tried to fix my problem by reading this thread, but I wasn't successful so far. I want participants to rank certain words (presented as pictures) by dragging and dropping them into rectangular shapes. Here is my (quick n dirty) script so far:
ITEMS

<item energy>
/1 = "Energie.png"
</item>

<item health>
/1 = "Gesundheit.png"
</item>

<item weight>
/1 = "Gewicht.png"
</item>

<item bodystrength>
/1 = "Körperkraft.png"
</item>

<item bodyattr>
/1 = "Körperliche Attraktivität.png"
</item>

<item bodyfit>
/1= "Körperliche Fitness.png"
</item>

<item bodymeas>
/1 = "Körpermaße z.B. Brust Taille Hüfte.png"
</item>

<item coordination>
/1 = "Physische Koordination.png"
</item>

<item sexappeal>
/1 = "Sex-Appeal.png"
</item>

<item vismusbody>
/1 = "Sichtbar muskulöser Körper.png"
</item>

PICTURES

<picture energy>
/items = energy
/size = (7%, 7%)
/position = (5%,5%)
/ dropsource = true
</picture>

<picture health>
/items = health
/size = (6%, 6%)
/ position = (5%,10%)
/ dropsource = true
</picture>

<picture weight>
/items = weight
/size = (6%, 6%)
/ position = (5%,15%)
/ dropsource = true
</picture>

<picture bodystrength>
/items = bodystrength
/size = (6%, 6%)
/ position = (5%,20%)
/ dropsource = true
</picture>

<picture bodyattr>
/items = bodyattr
/size = (6%, 6%)
/ position = (5%,25%)
/ dropsource = true
</picture>

<picture bodyfit>
/items= bodyfit
/size = (6%, 6%)
/ position = (5%,30%)
/ dropsource = true
</picture>

<picture bodymeas>
/items = bodymeas
/size = (6%, 6%)
/ position = (5%,35%)
/ dropsource = true
</picture>

<picture coordination>
/items = coordination
/size = (6%, 6%)
/position = (5%,40%)
/ dropsource = true
</picture>

<picture sexappeal>
/items = sexappeal
/size = (6%, 6%)
/position = (5%,45%)
/ dropsource = true
</picture>

<picture vismusbody>
/items = vismusbody
/size = (6%, 6%)
/position = (5%,50%)
/ dropsource = true
</picture>

SHAPES

<shape drop1>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 5%)
</shape>


<shape drop2>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 15%)
</shape>


<shape drop3>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 25%)
</shape>


<shape drop4>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop5>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop6>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 45%)
</shape>


<shape drop7>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 55%)
</shape>


<shape drop8>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 65%)
</shape>


<shape drop9>
/ shape = rectangle
/ size = (10%, 15%)
/color = white
/ droptarget = true
/ position = (80%, 75%)
</shape>


<shape drop10>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 85%)
</shape>

<trial SOQ>
/ stimulusframes = [1 = drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10, energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight,health ]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight, health)
</trial>

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

<expt SOQ>
/ blocks = [1=SOQ]
</expt>



My questions are:
1. I cannot seem to manage that the rectangle has a frame to make it visible. How can I do that?
2. The Dragndrop does not work, what am I doing wrong?

I know, I could probably find the answers in the ToL script or the other one that you posted, but for some reason I cannot apply those scripts to my needs. Sorry, if I miss the obvious here...

Thank you in advance!
M.



Happy to take a look, but please provide the actual script and include all the files it requires to run (i.e. the images, etc.). You can ZIP everything up and then attach it to a post by clicking +Insert -> Add File.
By mongrel - 6/17/2019

Dave - 6/18/2019
mongrel - 6/18/2019
Hi Dave,

I tried to fix my problem by reading this thread, but I wasn't successful so far. I want participants to rank certain words (presented as pictures) by dragging and dropping them into rectangular shapes. Here is my (quick n dirty) script so far:
ITEMS

<item energy>
/1 = "Energie.png"
</item>

<item health>
/1 = "Gesundheit.png"
</item>

<item weight>
/1 = "Gewicht.png"
</item>

<item bodystrength>
/1 = "Körperkraft.png"
</item>

<item bodyattr>
/1 = "Körperliche Attraktivität.png"
</item>

<item bodyfit>
/1= "Körperliche Fitness.png"
</item>

<item bodymeas>
/1 = "Körpermaße z.B. Brust Taille Hüfte.png"
</item>

<item coordination>
/1 = "Physische Koordination.png"
</item>

<item sexappeal>
/1 = "Sex-Appeal.png"
</item>

<item vismusbody>
/1 = "Sichtbar muskulöser Körper.png"
</item>

PICTURES

<picture energy>
/items = energy
/size = (7%, 7%)
/position = (5%,5%)
/ dropsource = true
</picture>

<picture health>
/items = health
/size = (6%, 6%)
/ position = (5%,10%)
/ dropsource = true
</picture>

<picture weight>
/items = weight
/size = (6%, 6%)
/ position = (5%,15%)
/ dropsource = true
</picture>

<picture bodystrength>
/items = bodystrength
/size = (6%, 6%)
/ position = (5%,20%)
/ dropsource = true
</picture>

<picture bodyattr>
/items = bodyattr
/size = (6%, 6%)
/ position = (5%,25%)
/ dropsource = true
</picture>

<picture bodyfit>
/items= bodyfit
/size = (6%, 6%)
/ position = (5%,30%)
/ dropsource = true
</picture>

<picture bodymeas>
/items = bodymeas
/size = (6%, 6%)
/ position = (5%,35%)
/ dropsource = true
</picture>

<picture coordination>
/items = coordination
/size = (6%, 6%)
/position = (5%,40%)
/ dropsource = true
</picture>

<picture sexappeal>
/items = sexappeal
/size = (6%, 6%)
/position = (5%,45%)
/ dropsource = true
</picture>

<picture vismusbody>
/items = vismusbody
/size = (6%, 6%)
/position = (5%,50%)
/ dropsource = true
</picture>

SHAPES

<shape drop1>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 5%)
</shape>


<shape drop2>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 15%)
</shape>


<shape drop3>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 25%)
</shape>


<shape drop4>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop5>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop6>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 45%)
</shape>


<shape drop7>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 55%)
</shape>


<shape drop8>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 65%)
</shape>


<shape drop9>
/ shape = rectangle
/ size = (10%, 15%)
/color = white
/ droptarget = true
/ position = (80%, 75%)
</shape>


<shape drop10>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 85%)
</shape>

<trial SOQ>
/ stimulusframes = [1 = drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10, energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight,health ]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight, health)
</trial>

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

<expt SOQ>
/ blocks = [1=SOQ]
</expt>



My questions are:
1. I cannot seem to manage that the rectangle has a frame to make it visible. How can I do that?
2. The Dragndrop does not work, what am I doing wrong?

I know, I could probably find the answers in the ToL script or the other one that you posted, but for some reason I cannot apply those scripts to my needs. Sorry, if I miss the obvious here...

Thank you in advance!
M.



Happy to take a look, but please provide the actual script and include all the files it requires to run (i.e. the images, etc.). You can ZIP everything up and then attach it to a post by clicking +Insert -> Add File.

Thank you, Dave!

Dave - 6/18/2019
mongrel - 6/18/2019
Hi Dave,

I tried to fix my problem by reading this thread, but I wasn't successful so far. I want participants to rank certain words (presented as pictures) by dragging and dropping them into rectangular shapes. Here is my (quick n dirty) script so far:
ITEMS

<item energy>
/1 = "Energie.png"
</item>

<item health>
/1 = "Gesundheit.png"
</item>

<item weight>
/1 = "Gewicht.png"
</item>

<item bodystrength>
/1 = "Körperkraft.png"
</item>

<item bodyattr>
/1 = "Körperliche Attraktivität.png"
</item>

<item bodyfit>
/1= "Körperliche Fitness.png"
</item>

<item bodymeas>
/1 = "Körpermaße z.B. Brust Taille Hüfte.png"
</item>

<item coordination>
/1 = "Physische Koordination.png"
</item>

<item sexappeal>
/1 = "Sex-Appeal.png"
</item>

<item vismusbody>
/1 = "Sichtbar muskulöser Körper.png"
</item>

PICTURES

<picture energy>
/items = energy
/size = (7%, 7%)
/position = (5%,5%)
/ dropsource = true
</picture>

<picture health>
/items = health
/size = (6%, 6%)
/ position = (5%,10%)
/ dropsource = true
</picture>

<picture weight>
/items = weight
/size = (6%, 6%)
/ position = (5%,15%)
/ dropsource = true
</picture>

<picture bodystrength>
/items = bodystrength
/size = (6%, 6%)
/ position = (5%,20%)
/ dropsource = true
</picture>

<picture bodyattr>
/items = bodyattr
/size = (6%, 6%)
/ position = (5%,25%)
/ dropsource = true
</picture>

<picture bodyfit>
/items= bodyfit
/size = (6%, 6%)
/ position = (5%,30%)
/ dropsource = true
</picture>

<picture bodymeas>
/items = bodymeas
/size = (6%, 6%)
/ position = (5%,35%)
/ dropsource = true
</picture>

<picture coordination>
/items = coordination
/size = (6%, 6%)
/position = (5%,40%)
/ dropsource = true
</picture>

<picture sexappeal>
/items = sexappeal
/size = (6%, 6%)
/position = (5%,45%)
/ dropsource = true
</picture>

<picture vismusbody>
/items = vismusbody
/size = (6%, 6%)
/position = (5%,50%)
/ dropsource = true
</picture>

SHAPES

<shape drop1>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 5%)
</shape>


<shape drop2>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 15%)
</shape>


<shape drop3>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 25%)
</shape>


<shape drop4>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop5>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop6>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 45%)
</shape>


<shape drop7>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 55%)
</shape>


<shape drop8>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 65%)
</shape>


<shape drop9>
/ shape = rectangle
/ size = (10%, 15%)
/color = white
/ droptarget = true
/ position = (80%, 75%)
</shape>


<shape drop10>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 85%)
</shape>

<trial SOQ>
/ stimulusframes = [1 = drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10, energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight,health ]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight, health)
</trial>

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

<expt SOQ>
/ blocks = [1=SOQ]
</expt>



My questions are:
1. I cannot seem to manage that the rectangle has a frame to make it visible. How can I do that?
2. The Dragndrop does not work, what am I doing wrong?

I know, I could probably find the answers in the ToL script or the other one that you posted, but for some reason I cannot apply those scripts to my needs. Sorry, if I miss the obvious here...

Thank you in advance!
M.



Happy to take a look, but please provide the actual script and include all the files it requires to run (i.e. the images, etc.). You can ZIP everything up and then attach it to a post by clicking +Insert -> Add File.

Thanks a lot, Dave!
By Dave - 6/17/2019

mongrel - 6/18/2019
Dave - 6/18/2019
mongrel - 6/18/2019
Hi Dave,

I tried to fix my problem by reading this thread, but I wasn't successful so far. I want participants to rank certain words (presented as pictures) by dragging and dropping them into rectangular shapes. Here is my (quick n dirty) script so far:
ITEMS

<item energy>
/1 = "Energie.png"
</item>

<item health>
/1 = "Gesundheit.png"
</item>

<item weight>
/1 = "Gewicht.png"
</item>

<item bodystrength>
/1 = "Körperkraft.png"
</item>

<item bodyattr>
/1 = "Körperliche Attraktivität.png"
</item>

<item bodyfit>
/1= "Körperliche Fitness.png"
</item>

<item bodymeas>
/1 = "Körpermaße z.B. Brust Taille Hüfte.png"
</item>

<item coordination>
/1 = "Physische Koordination.png"
</item>

<item sexappeal>
/1 = "Sex-Appeal.png"
</item>

<item vismusbody>
/1 = "Sichtbar muskulöser Körper.png"
</item>

PICTURES

<picture energy>
/items = energy
/size = (7%, 7%)
/position = (5%,5%)
/ dropsource = true
</picture>

<picture health>
/items = health
/size = (6%, 6%)
/ position = (5%,10%)
/ dropsource = true
</picture>

<picture weight>
/items = weight
/size = (6%, 6%)
/ position = (5%,15%)
/ dropsource = true
</picture>

<picture bodystrength>
/items = bodystrength
/size = (6%, 6%)
/ position = (5%,20%)
/ dropsource = true
</picture>

<picture bodyattr>
/items = bodyattr
/size = (6%, 6%)
/ position = (5%,25%)
/ dropsource = true
</picture>

<picture bodyfit>
/items= bodyfit
/size = (6%, 6%)
/ position = (5%,30%)
/ dropsource = true
</picture>

<picture bodymeas>
/items = bodymeas
/size = (6%, 6%)
/ position = (5%,35%)
/ dropsource = true
</picture>

<picture coordination>
/items = coordination
/size = (6%, 6%)
/position = (5%,40%)
/ dropsource = true
</picture>

<picture sexappeal>
/items = sexappeal
/size = (6%, 6%)
/position = (5%,45%)
/ dropsource = true
</picture>

<picture vismusbody>
/items = vismusbody
/size = (6%, 6%)
/position = (5%,50%)
/ dropsource = true
</picture>

SHAPES

<shape drop1>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 5%)
</shape>


<shape drop2>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 15%)
</shape>


<shape drop3>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 25%)
</shape>


<shape drop4>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop5>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop6>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 45%)
</shape>


<shape drop7>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 55%)
</shape>


<shape drop8>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 65%)
</shape>


<shape drop9>
/ shape = rectangle
/ size = (10%, 15%)
/color = white
/ droptarget = true
/ position = (80%, 75%)
</shape>


<shape drop10>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 85%)
</shape>

<trial SOQ>
/ stimulusframes = [1 = drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10, energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight,health ]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight, health)
</trial>

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

<expt SOQ>
/ blocks = [1=SOQ]
</expt>



My questions are:
1. I cannot seem to manage that the rectangle has a frame to make it visible. How can I do that?
2. The Dragndrop does not work, what am I doing wrong?

I know, I could probably find the answers in the ToL script or the other one that you posted, but for some reason I cannot apply those scripts to my needs. Sorry, if I miss the obvious here...

Thank you in advance!
M.



Happy to take a look, but please provide the actual script and include all the files it requires to run (i.e. the images, etc.). You can ZIP everything up and then attach it to a post by clicking +Insert -> Add File.

Thank you, Dave!

Dave - 6/18/2019
mongrel - 6/18/2019
Hi Dave,

I tried to fix my problem by reading this thread, but I wasn't successful so far. I want participants to rank certain words (presented as pictures) by dragging and dropping them into rectangular shapes. Here is my (quick n dirty) script so far:
ITEMS

<item energy>
/1 = "Energie.png"
</item>

<item health>
/1 = "Gesundheit.png"
</item>

<item weight>
/1 = "Gewicht.png"
</item>

<item bodystrength>
/1 = "Körperkraft.png"
</item>

<item bodyattr>
/1 = "Körperliche Attraktivität.png"
</item>

<item bodyfit>
/1= "Körperliche Fitness.png"
</item>

<item bodymeas>
/1 = "Körpermaße z.B. Brust Taille Hüfte.png"
</item>

<item coordination>
/1 = "Physische Koordination.png"
</item>

<item sexappeal>
/1 = "Sex-Appeal.png"
</item>

<item vismusbody>
/1 = "Sichtbar muskulöser Körper.png"
</item>

PICTURES

<picture energy>
/items = energy
/size = (7%, 7%)
/position = (5%,5%)
/ dropsource = true
</picture>

<picture health>
/items = health
/size = (6%, 6%)
/ position = (5%,10%)
/ dropsource = true
</picture>

<picture weight>
/items = weight
/size = (6%, 6%)
/ position = (5%,15%)
/ dropsource = true
</picture>

<picture bodystrength>
/items = bodystrength
/size = (6%, 6%)
/ position = (5%,20%)
/ dropsource = true
</picture>

<picture bodyattr>
/items = bodyattr
/size = (6%, 6%)
/ position = (5%,25%)
/ dropsource = true
</picture>

<picture bodyfit>
/items= bodyfit
/size = (6%, 6%)
/ position = (5%,30%)
/ dropsource = true
</picture>

<picture bodymeas>
/items = bodymeas
/size = (6%, 6%)
/ position = (5%,35%)
/ dropsource = true
</picture>

<picture coordination>
/items = coordination
/size = (6%, 6%)
/position = (5%,40%)
/ dropsource = true
</picture>

<picture sexappeal>
/items = sexappeal
/size = (6%, 6%)
/position = (5%,45%)
/ dropsource = true
</picture>

<picture vismusbody>
/items = vismusbody
/size = (6%, 6%)
/position = (5%,50%)
/ dropsource = true
</picture>

SHAPES

<shape drop1>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 5%)
</shape>


<shape drop2>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 15%)
</shape>


<shape drop3>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 25%)
</shape>


<shape drop4>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop5>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop6>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 45%)
</shape>


<shape drop7>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 55%)
</shape>


<shape drop8>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 65%)
</shape>


<shape drop9>
/ shape = rectangle
/ size = (10%, 15%)
/color = white
/ droptarget = true
/ position = (80%, 75%)
</shape>


<shape drop10>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 85%)
</shape>

<trial SOQ>
/ stimulusframes = [1 = drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10, energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight,health ]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight, health)
</trial>

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

<expt SOQ>
/ blocks = [1=SOQ]
</expt>



My questions are:
1. I cannot seem to manage that the rectangle has a frame to make it visible. How can I do that?
2. The Dragndrop does not work, what am I doing wrong?

I know, I could probably find the answers in the ToL script or the other one that you posted, but for some reason I cannot apply those scripts to my needs. Sorry, if I miss the obvious here...

Thank you in advance!
M.



Happy to take a look, but please provide the actual script and include all the files it requires to run (i.e. the images, etc.). You can ZIP everything up and then attach it to a post by clicking +Insert -> Add File.

Thanks a lot, Dave!

Thanks for the files. Two things:
- To create a "frame" around a rectangular <shape>, you need to put another, slightly larger rectangular <shape> with a different color behind it.
- Your drag & drop doesn't work because you've specified the drop sources as valid responses. It's the drop targets (drop1 to drop10) that need to be the valid responses.

Overall, this example here should be a good model for what you want to do:

<block myblock>
/ trials = [1=start]
</block>

<data>
/ columns = (date,time,group,subject,build,blocknum,trialnum,blockcode,trialcode,pretrialpause,posttrialpause,trialduration,trialtimeout,response,correct,latency,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,
  values.box1, values.box2, values.box3, values.box4, values.box5, values.box6)
</data>

<values>
/ box1 = ""
/ box2 = ""
/ box3 = ""
/ box4 = ""
/ box5 = ""
/ box6 = ""
</values>

<trial mytrial>
/ ontrialbegin = [
shape.pos1.droptarget = expressions.available_p1_slots;
shape.pos2.droptarget = expressions.available_p2_slots;
shape.pos3.droptarget = expressions.available_p3_slots;
shape.pos4.droptarget = expressions.available_p4_slots;
shape.pos5.droptarget = expressions.available_p5_slots;
shape.pos6.droptarget = expressions.available_p6_slots;
]

/ ontrialend = [
shape.pos1.droptarget = expressions.available_p1_slots;
shape.pos2.droptarget = expressions.available_p2_slots;
shape.pos3.droptarget = expressions.available_p3_slots;
shape.pos4.droptarget = expressions.available_p4_slots;
shape.pos5.droptarget = expressions.available_p5_slots;
shape.pos6.droptarget = expressions.available_p6_slots;
]

/ stimulustimes = [0 = pos1,pos2,pos3,pos4,pos5,pos6,A,B,C,D,E,F,G,H,I,J,K,L,posrep1,posrep2,posrep3,posrep4,posrep5,posrep6,posrep2_1,posrep2_2,posrep2_3,posrep2_4,posrep2_5,posrep2_6,
RVSL]
/ validresponse = (pos1,pos2,pos3,pos4,pos5,pos6)
/ isvalidresponse = [
if (trial.mytrial.response == "pos1")
{
values.p1_count += 1;
shape.pos1.droptarget;
}
else if (trial.mytrial.response == "pos2")
{
values.p2_count += 1;
shape.pos2.droptarget;
}
else if (trial.mytrial.response == "pos3")
{
values.p3_count += 1;
shape.pos3.droptarget;
}
else if (trial.mytrial.response == "pos4")
{
values.p4_count += 1;
shape.pos4.droptarget;
}
else if (trial.mytrial.response == "pos5")
{
values.p5_count += 1;
shape.pos5.droptarget;
}
else if (trial.mytrial.response == "pos6")
{
values.p6_count += 1;
shape.pos6.droptarget;
}
else
true;
]
/ inputdevice = dragdrop
/ branch = [
if ((expressions.available_p1_slots + expressions.available_p2_slots + expressions.available_p3_slots + expressions.available_p4_slots + expressions.available_p5_slots + expressions.available_p6_slots) <= 0) trial.yousure else trial.mytrial
]
</trial>

<expressions>
/ available_p1_slots = if(
(text.A.hposition==25 && text.A.vposition==80) ||
(text.B.hposition==25 && text.B.vposition==80) ||
(text.C.hposition==25 && text.C.vposition==80) ||
(text.D.hposition==25 && text.D.vposition==80) ||
(text.E.hposition==25 && text.E.vposition==80) ||
(text.F.hposition==25 && text.F.vposition==80) ||
(text.G.hposition==25 && text.G.vposition==80) ||
(text.H.hposition==25 && text.H.vposition==80) ||
(text.I.hposition==25 && text.I.vposition==80) ||
(text.J.hposition==25 && text.J.vposition==80) ||
(text.K.hposition==25 && text.K.vposition==80) ||
(text.L.hposition==25 && text.L.vposition==80)
)
false else true;
/ available_p2_slots = if(
(text.A.hposition==35 && text.A.vposition==80) ||
(text.B.hposition==35 && text.B.vposition==80) ||
(text.C.hposition==35 && text.C.vposition==80) ||
(text.D.hposition==35 && text.D.vposition==80) ||
(text.E.hposition==35 && text.E.vposition==80) ||
(text.F.hposition==35 && text.F.vposition==80) ||
(text.G.hposition==35 && text.G.vposition==80) ||
(text.H.hposition==35 && text.H.vposition==80) ||
(text.I.hposition==35 && text.I.vposition==80) ||
(text.J.hposition==35 && text.J.vposition==80) ||
(text.K.hposition==35 && text.K.vposition==80) ||
(text.L.hposition==35 && text.L.vposition==80)
)
false else true;
/ available_p3_slots = if(
(text.A.hposition==45 && text.A.vposition==80) ||
(text.B.hposition==45 && text.B.vposition==80) ||
(text.C.hposition==45 && text.C.vposition==80) ||
(text.D.hposition==45 && text.D.vposition==80) ||
(text.E.hposition==45 && text.E.vposition==80) ||
(text.F.hposition==45 && text.F.vposition==80) ||
(text.G.hposition==45 && text.G.vposition==80) ||
(text.H.hposition==45 && text.H.vposition==80) ||
(text.I.hposition==45 && text.I.vposition==80) ||
(text.J.hposition==45 && text.J.vposition==80) ||
(text.K.hposition==45 && text.K.vposition==80) ||
(text.L.hposition==45 && text.L.vposition==80)
)
false else true;
/ available_p4_slots = if(
(text.A.hposition==55 && text.A.vposition==80) ||
(text.B.hposition==55 && text.B.vposition==80) ||
(text.C.hposition==55 && text.C.vposition==80) ||
(text.D.hposition==55 && text.D.vposition==80) ||
(text.E.hposition==55 && text.E.vposition==80) ||
(text.F.hposition==55 && text.F.vposition==80) ||
(text.G.hposition==55 && text.G.vposition==80) ||
(text.H.hposition==55 && text.H.vposition==80) ||
(text.I.hposition==55 && text.I.vposition==80) ||
(text.J.hposition==55 && text.J.vposition==80) ||
(text.K.hposition==55 && text.K.vposition==80) ||
(text.L.hposition==55 && text.L.vposition==80)
)
false else true;
/ available_p5_slots = if(
(text.A.hposition==65 && text.A.vposition==80) ||
(text.B.hposition==65 && text.B.vposition==80) ||
(text.C.hposition==65 && text.C.vposition==80) ||
(text.D.hposition==65 && text.D.vposition==80) ||
(text.E.hposition==65 && text.E.vposition==80) ||
(text.F.hposition==65 && text.F.vposition==80) ||
(text.G.hposition==65 && text.G.vposition==80) ||
(text.H.hposition==65 && text.H.vposition==80) ||
(text.I.hposition==65 && text.I.vposition==80) ||
(text.J.hposition==65 && text.J.vposition==80) ||
(text.K.hposition==65 && text.K.vposition==80) ||
(text.L.hposition==65 && text.L.vposition==80)
)
false else true;
/ available_p6_slots = if(
(text.A.hposition==75 && text.A.vposition==80) ||
(text.B.hposition==75 && text.B.vposition==80) ||
(text.C.hposition==75 && text.C.vposition==80) ||
(text.D.hposition==75 && text.D.vposition==80) ||
(text.E.hposition==75 && text.E.vposition==80) ||
(text.F.hposition==75 && text.F.vposition==80) ||
(text.G.hposition==75 && text.G.vposition==80) ||
(text.H.hposition==75 && text.H.vposition==80) ||
(text.I.hposition==75 && text.I.vposition==80) ||
(text.J.hposition==75 && text.J.vposition==80) ||
(text.K.hposition==75 && text.K.vposition==80) ||
(text.L.hposition==75 && text.L.vposition==80)
)
false else true;
</expressions>

<expressions>
/ a =
  if (text.A.hposition == 25 && text.A.vposition == 80) {
   values.box1 = "A";
  }
  else if (text.A.hposition == 35 && text.A.vposition == 80) {
   values.box2 = "A";
  }
  else if (text.A.hposition == 45 && text.A.vposition == 80) {
   values.box3 = "A";
  }
  else if (text.A.hposition == 55 && text.A.vposition == 80) {
   values.box4 = "A";
  }
  else if (text.A.hposition == 65 && text.A.vposition == 80) {
   values.box5 = "A";
  }
  else if (text.A.hposition == 75 && text.A.vposition == 80) {
   values.box6 = "A";
  };
/ b =
  if (text.B.hposition == 25 && text.B.vposition == 80) {
   values.box1 = "B";
  }
  else if (text.B.hposition == 35 && text.B.vposition == 80) {
   values.box2 = "B";
  }
  else if (text.B.hposition == 45 && text.B.vposition == 80) {
   values.box3 = "B";
  }
  else if (text.B.hposition == 55 && text.B.vposition == 80) {
   values.box4 = "B";
  }
  else if (text.B.hposition == 65 && text.B.vposition == 80) {
   values.box5 = "B";
  }
  else if (text.B.hposition == 75 && text.B.vposition == 80) {
   values.box6 = "B";
  };
/ c =
  if (text.C.hposition == 25 && text.C.vposition == 80) {
   values.Box1 = "C";
  }
  else if (text.C.hposition == 35 && text.C.vposition == 80) {
   values.Box2 = "C";
  }
  else if (text.C.hposition == 45 && text.C.vposition == 80) {
   values.Box3 = "C";
  }
  else if (text.C.hposition == 55 && text.C.vposition == 80) {
   values.Box4 = "C";
  }
  else if (text.C.hposition == 65 && text.C.vposition == 80) {
   values.Box5 = "C";
  }
  else if (text.C.hposition == 75 && text.C.vposition == 80) {
   values.Box6 = "C";
  };
/ d =
  if (text.D.hposition == 25 && text.D.vposition == 80) {
   values.Box1 = "D";
  }
  else if (text.D.hposition == 35 && text.D.vposition == 80) {
   values.Box2 = "D";
  }
  else if (text.D.hposition == 45 && text.D.vposition == 80) {
   values.Box3 = "D";
  }
  else if (text.D.hposition == 55 && text.D.vposition == 80) {
   values.Box4 = "D";
  }
  else if (text.D.hposition == 65 && text.D.vposition == 80) {
   values.Box5 = "D";
  }
  else if (text.D.hposition == 75 && text.D.vposition == 80) {
   values.Box6 = "D";
  }
/ e =
  if (text.E.hposition == 25 && text.E.vposition == 80) {
   values.Box1 = "E";
  }
  else if (text.E.hposition == 35 && text.E.vposition == 80) {
   values.Box2 = "E";
  }
  else if (text.E.hposition == 45 && text.E.vposition == 80) {
   values.Box3 = "E";
  }
  else if (text.E.hposition == 55 && text.E.vposition == 80) {
   values.Box4 = "E";
  }
  else if (text.E.hposition == 65 && text.E.vposition == 80) {
   values.Box5 = "E";
  }
  else if (text.E.hposition == 75 && text.E.vposition == 80) {
   values.Box6 = "E";
  };
/ f =
  if (text.F.hposition == 25 && text.F.vposition == 80) {
   values.Box1 = "F";
  }
  else if (text.F.hposition == 35 && text.F.vposition == 80) {
   values.Box2 = "F";
  }
  else if (text.F.hposition == 45 && text.F.vposition == 80) {
   values.Box3 = "F";
  }
  else if (text.F.hposition == 55 && text.F.vposition == 80) {
   values.Box4 = "F";
  }
  else if (text.F.hposition == 65 && text.F.vposition == 80) {
   values.Box5 = "F";
  }
  else if (text.F.hposition == 75 && text.F.vposition == 80) {
   values.Box6 = "F";
  };
/ g =
  if (text.G.hposition == 25 && text.G.vposition == 80) {
   values.Box1 = "G";
  }
  else if (text.G.hposition == 35 && text.G.vposition == 80) {
   values.Box2 = "G";
  }
  else if (text.G.hposition == 45 && text.G.vposition == 80) {
   values.Box3 = "G";
  }
  else if (text.G.hposition == 55 && text.G.vposition == 80) {
   values.Box4 = "G";
  }
  else if (text.G.hposition == 65 && text.G.vposition == 80) {
   values.Box5 = "G";
  }
  else if (text.G.hposition == 75 && text.G.vposition == 80) {
   values.Box6 = "G";
  };
/ h =
  if (text.H.hposition == 25 && text.H.vposition == 80) {
   values.Box1 = "H";
  }
  else if (text.H.hposition == 35 && text.H.vposition == 80) {
   values.Box2 = "H";
  }
  else if (text.H.hposition == 45 && text.H.vposition == 80) {
   values.Box3 = "H";
  }
  else if (text.H.hposition == 55 && text.H.vposition == 80) {
   values.Box4 = "H";
  }
  else if (text.H.hposition == 65 && text.H.vposition == 80) {
   values.Box5 = "H";
  }
  else if (text.H.hposition == 75 && text.H.vposition == 80) {
   values.Box6 = "H";
  };
/ i =
  if (text.I.hposition == 25 && text.I.vposition == 80) {
   values.Box1 = "I";
  }
  else if (text.I.hposition == 35 && text.I.vposition == 80) {
   values.Box2 = "I";
  }
  else if (text.I.hposition == 45 && text.I.vposition == 80) {
   values.Box3 = "I";
  }
  else if (text.I.hposition == 55 && text.I.vposition == 80) {
   values.Box4 = "I";
  }
  else if (text.I.hposition == 65 && text.I.vposition == 80) {
   values.Box5 = "I";
  }
  else if (text.I.hposition == 75 && text.I.vposition == 80) {
   values.Box6 = "I";
  };
/ j =
  if (text.J.hposition == 25 && text.J.vposition == 80) {
   values.Box1 = "J";
  }
  else if (text.J.hposition == 35 && text.J.vposition == 80) {
   values.Box2 = "J";
  }
  else if (text.J.hposition == 45 && text.J.vposition == 80) {
   values.Box3 = "J";
  }
  else if (text.J.hposition == 55 && text.J.vposition == 80) {
   values.Box4 = "J";
  }
  else if (text.J.hposition == 65 && text.J.vposition == 80) {
   values.Box5 = "J";
  }
  else if (text.J.hposition == 75 && text.J.vposition == 80) {
   values.Box6 = "J";
  };
/ k =
  if (text.K.hposition == 25 && text.K.vposition == 80) {
   values.Box1 = "K";
  }
  else if (text.K.hposition == 35 && text.K.vposition == 80) {
   values.Box2 = "K";
  }
  else if (text.K.hposition == 45 && text.K.vposition == 80) {
   values.Box3 = "K";
  }
  else if (text.K.hposition == 55 && text.K.vposition == 80) {
   values.Box4 = "K";
  }
  else if (text.K.hposition == 65 && text.K.vposition == 80) {
   values.Box5 = "K";
  }
  else if (text.K.hposition == 75 && text.K.vposition == 80) {
   values.Box6 = "K";
  };
/ l =
  if (text.L.hposition == 25 && text.L.vposition == 80) {
   values.Box1 = "L";
  }
  else if (text.L.hposition == 35 && text.L.vposition == 80) {
   values.Box2 = "L";
  }
  else if (text.L.hposition == 45 && text.L.vposition == 80) {
   values.Box3 = "L";
  }
  else if (text.L.hposition == 55 && text.L.vposition == 80) {
   values.Box4 = "L";
  }
  else if (text.L.hposition == 65 && text.L.vposition == 80) {
   values.Box5 = "L";
  }
  else if (text.L.hposition == 75 && text.L.vposition == 80) {
   values.Box6 = "L";
  };
/ check_all = {
expressions.a; expressions.b; expressions.c; expressions.d; expressions.e; expressions.f;
expressions.g; expressions.h; expressions.i; expressions.j; expressions.k; expressions.l;
}
</expressions>


<values>
/ p1_count = 0
/ p2_count = 0
/ p3_count = 0
/ p4_count = 0
/ p5_count = 0
/ p6_count = 0
</values>

<trial start>
/ ontrialbegin = [
values.p1_count=0;
values.p2_count=0;
values.p3_count=0;
values.p4_count=0;
values.p5_count=0;
values.p6_count=0;
text.A.hposition = 25%;
text.A.vposition = 40%;
text.B.hposition = 35%;
text.B.vposition = 40%;
text.C.hposition = 45%;
text.C.vposition = 40%;
text.D.hposition = 55%;
text.D.vposition = 40%;
text.E.hposition = 65%;
text.E.vposition = 40%;
text.F.hposition = 75%;
text.F.vposition = 40%;
text.G.hposition = 25%;
text.G.vposition = 60%;
text.H.hposition = 35%;
text.H.vposition = 60%;
text.I.hposition = 45%;
text.I.vposition = 60%;
text.J.hposition = 55%;
text.J.vposition = 60%;
text.K.hposition = 65%;
text.K.vposition = 60%;
text.L.hposition = 75%;
text.L.vposition = 60%;
]
/ branch = [
trial.mytrial
]
/ trialduration = 0
</trial>

<trial yousure>
/ stimulusframes = [1=pos1,pos2,pos3,pos4,pos5,pos6,A,B,C,D,E,F,G,H,I,J,K,L,posrep1,posrep2,posrep3,posrep4,posrep5,posrep6,posrep2_1,posrep2_2,posrep2_3,posrep2_4,posrep2_5,posrep2_6,
RVSL,endtext]
/ validresponse = (30,38)
]
/ branch = [
if (trial.yousure.response == 30) trial.start else trial.end
]
</trial>

<trial end>
/ ontrialbegin = [
expressions.check_all;
]
/ stimulusframes = [1=pos1,pos2,pos3,pos4,pos5,pos6,A,B,C,D,E,F,G,H,I,J,K,L,posrep1,posrep2,posrep3,posrep4,posrep5,posrep6,posrep2_1,posrep2_2,posrep2_3,posrep2_4,posrep2_5,posrep2_6,
RVSL,endtext2]

/ validresponse = (28)
</trial>

<text endtext>
/ items = ("Press A if you are NOT happy with the order of the shapes above, otherwise press L.")
/ position = (50,92)
/fontstyle = ("Arial", 3%, false, false, false, false, 5, 0)
</text>

<text endtext2>
/ items = ("Press ENTER to continue.")
/ position = (50,92)
/fontstyle = ("Arial", 3%, false, false, false, false, 5, 0)
</text>

<text RVSL>
/ items = RVSL
/ position = (50,32)
/fontstyle = ("Arial", 3%, false, false, false, false, 5, 0)
/txcolor = black
/txbgcolor = (transparent)
/resetinterval = 3
/size = (80%,50%)
/ txbgcolor = transparent
</text>

<item RVSL>
/1 = "Please rank the shapes you saw by the order that you think they appeared. For example, put the shape that you think was shown LEAST often in the first box and the shape you think was presented second LEAST often in the second box and so on, until the last box where you will put the shape you think you saw the MOST often.

If you don’t think a shape was presented to you at all, please do not click on that shape."
</item>



<text A>
/ items = ("A.jpg")
/ position = (25,40)
/ dropsource = true
</text>

<text B>
/ items = ("B.jpg")
/ position = (35,40)
/ dropsource = true
</text>

<text C>
/ items = ("C.jpg")
/ position = (45,40)
/ dropsource = true
</text>

<text D>
/ items = ("D.jpg")
/ position = (55,40)
/ dropsource = true
</text>

<text E>
/ items = ("E.jpg")
/ position = (65,40)
/ dropsource = true
</text>

<text F>
/ items = ("F.jpg")
/ position = (75,40)
/ dropsource = true
</text>


<text G>
/ items = ("G.jpg")
/ position = (25,60)
/ dropsource = true
</text>

<text H>
/ items = ("H.jpg")
/ position = (35,60)
/ dropsource = true
</text>

<text I>
/ items = ("I.jpg")
/ position = (45,60)
/ dropsource = true
</text>

<text J>
/ items = ("J.jpg")
/ position = (55,60)
/ dropsource = true
</text>

<text K>
/ items = ("K.jpg")
/ position = (65,60)
/ dropsource = true
</text>

<text L>
/ items = ("L.jpg")
/ position = (75,60)
/ dropsource = true
</text>



<shape pos1>
/ hposition = 25
/ vposition = 80
/ dropposition = (25,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>

<shape pos2>
/ hposition = 35
/ vposition = 80
/ dropposition = (35,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>

<shape pos3>
/ hposition = 45
/ vposition = 80
/ dropposition = (45,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>

<shape pos4>
/ hposition = 55
/ vposition = 80
/ dropposition = (55,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>

<shape pos5>
/ hposition = 65
/ vposition = 80
/ dropposition = (65,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>

<shape pos6>
/ hposition = 75
/ vposition = 80
/ dropposition = (75,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>


<shape posrep1>
/ hposition = 25
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2>
/ hposition = 35
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep3>
/ hposition = 45
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep4>
/ hposition = 55
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep5>
/ hposition = 65
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep6>
/ hposition = 75
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>


<shape posrep2_1>
/ hposition = 25
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2_2>
/ hposition = 35
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2_3>
/ hposition = 45
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2_4>
/ hposition = 55
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2_5>
/ hposition = 65
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2_6>
/ hposition = 75
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>
By mongrel - 6/18/2019

Dave - 6/18/2019
mongrel - 6/18/2019
Dave - 6/18/2019
mongrel - 6/18/2019
Hi Dave,

I tried to fix my problem by reading this thread, but I wasn't successful so far. I want participants to rank certain words (presented as pictures) by dragging and dropping them into rectangular shapes. Here is my (quick n dirty) script so far:
ITEMS

<item energy>
/1 = "Energie.png"
</item>

<item health>
/1 = "Gesundheit.png"
</item>

<item weight>
/1 = "Gewicht.png"
</item>

<item bodystrength>
/1 = "Körperkraft.png"
</item>

<item bodyattr>
/1 = "Körperliche Attraktivität.png"
</item>

<item bodyfit>
/1= "Körperliche Fitness.png"
</item>

<item bodymeas>
/1 = "Körpermaße z.B. Brust Taille Hüfte.png"
</item>

<item coordination>
/1 = "Physische Koordination.png"
</item>

<item sexappeal>
/1 = "Sex-Appeal.png"
</item>

<item vismusbody>
/1 = "Sichtbar muskulöser Körper.png"
</item>

PICTURES

<picture energy>
/items = energy
/size = (7%, 7%)
/position = (5%,5%)
/ dropsource = true
</picture>

<picture health>
/items = health
/size = (6%, 6%)
/ position = (5%,10%)
/ dropsource = true
</picture>

<picture weight>
/items = weight
/size = (6%, 6%)
/ position = (5%,15%)
/ dropsource = true
</picture>

<picture bodystrength>
/items = bodystrength
/size = (6%, 6%)
/ position = (5%,20%)
/ dropsource = true
</picture>

<picture bodyattr>
/items = bodyattr
/size = (6%, 6%)
/ position = (5%,25%)
/ dropsource = true
</picture>

<picture bodyfit>
/items= bodyfit
/size = (6%, 6%)
/ position = (5%,30%)
/ dropsource = true
</picture>

<picture bodymeas>
/items = bodymeas
/size = (6%, 6%)
/ position = (5%,35%)
/ dropsource = true
</picture>

<picture coordination>
/items = coordination
/size = (6%, 6%)
/position = (5%,40%)
/ dropsource = true
</picture>

<picture sexappeal>
/items = sexappeal
/size = (6%, 6%)
/position = (5%,45%)
/ dropsource = true
</picture>

<picture vismusbody>
/items = vismusbody
/size = (6%, 6%)
/position = (5%,50%)
/ dropsource = true
</picture>

SHAPES

<shape drop1>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 5%)
</shape>


<shape drop2>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 15%)
</shape>


<shape drop3>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 25%)
</shape>


<shape drop4>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop5>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop6>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 45%)
</shape>


<shape drop7>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 55%)
</shape>


<shape drop8>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 65%)
</shape>


<shape drop9>
/ shape = rectangle
/ size = (10%, 15%)
/color = white
/ droptarget = true
/ position = (80%, 75%)
</shape>


<shape drop10>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 85%)
</shape>

<trial SOQ>
/ stimulusframes = [1 = drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10, energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight,health ]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight, health)
</trial>

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

<expt SOQ>
/ blocks = [1=SOQ]
</expt>



My questions are:
1. I cannot seem to manage that the rectangle has a frame to make it visible. How can I do that?
2. The Dragndrop does not work, what am I doing wrong?

I know, I could probably find the answers in the ToL script or the other one that you posted, but for some reason I cannot apply those scripts to my needs. Sorry, if I miss the obvious here...

Thank you in advance!
M.



Happy to take a look, but please provide the actual script and include all the files it requires to run (i.e. the images, etc.). You can ZIP everything up and then attach it to a post by clicking +Insert -> Add File.

Thank you, Dave!

Dave - 6/18/2019
mongrel - 6/18/2019
Hi Dave,

I tried to fix my problem by reading this thread, but I wasn't successful so far. I want participants to rank certain words (presented as pictures) by dragging and dropping them into rectangular shapes. Here is my (quick n dirty) script so far:
ITEMS

<item energy>
/1 = "Energie.png"
</item>

<item health>
/1 = "Gesundheit.png"
</item>

<item weight>
/1 = "Gewicht.png"
</item>

<item bodystrength>
/1 = "Körperkraft.png"
</item>

<item bodyattr>
/1 = "Körperliche Attraktivität.png"
</item>

<item bodyfit>
/1= "Körperliche Fitness.png"
</item>

<item bodymeas>
/1 = "Körpermaße z.B. Brust Taille Hüfte.png"
</item>

<item coordination>
/1 = "Physische Koordination.png"
</item>

<item sexappeal>
/1 = "Sex-Appeal.png"
</item>

<item vismusbody>
/1 = "Sichtbar muskulöser Körper.png"
</item>

PICTURES

<picture energy>
/items = energy
/size = (7%, 7%)
/position = (5%,5%)
/ dropsource = true
</picture>

<picture health>
/items = health
/size = (6%, 6%)
/ position = (5%,10%)
/ dropsource = true
</picture>

<picture weight>
/items = weight
/size = (6%, 6%)
/ position = (5%,15%)
/ dropsource = true
</picture>

<picture bodystrength>
/items = bodystrength
/size = (6%, 6%)
/ position = (5%,20%)
/ dropsource = true
</picture>

<picture bodyattr>
/items = bodyattr
/size = (6%, 6%)
/ position = (5%,25%)
/ dropsource = true
</picture>

<picture bodyfit>
/items= bodyfit
/size = (6%, 6%)
/ position = (5%,30%)
/ dropsource = true
</picture>

<picture bodymeas>
/items = bodymeas
/size = (6%, 6%)
/ position = (5%,35%)
/ dropsource = true
</picture>

<picture coordination>
/items = coordination
/size = (6%, 6%)
/position = (5%,40%)
/ dropsource = true
</picture>

<picture sexappeal>
/items = sexappeal
/size = (6%, 6%)
/position = (5%,45%)
/ dropsource = true
</picture>

<picture vismusbody>
/items = vismusbody
/size = (6%, 6%)
/position = (5%,50%)
/ dropsource = true
</picture>

SHAPES

<shape drop1>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 5%)
</shape>


<shape drop2>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 15%)
</shape>


<shape drop3>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 25%)
</shape>


<shape drop4>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop5>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 35%)
</shape>


<shape drop6>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 45%)
</shape>


<shape drop7>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 55%)
</shape>


<shape drop8>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 65%)
</shape>


<shape drop9>
/ shape = rectangle
/ size = (10%, 15%)
/color = white
/ droptarget = true
/ position = (80%, 75%)
</shape>


<shape drop10>
/ shape = rectangle
/ size = (10%, 15%)
/ droptarget = true
/ position = (80%, 85%)
</shape>

<trial SOQ>
/ stimulusframes = [1 = drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10, energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight,health ]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight, health)
</trial>

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

<expt SOQ>
/ blocks = [1=SOQ]
</expt>



My questions are:
1. I cannot seem to manage that the rectangle has a frame to make it visible. How can I do that?
2. The Dragndrop does not work, what am I doing wrong?

I know, I could probably find the answers in the ToL script or the other one that you posted, but for some reason I cannot apply those scripts to my needs. Sorry, if I miss the obvious here...

Thank you in advance!
M.



Happy to take a look, but please provide the actual script and include all the files it requires to run (i.e. the images, etc.). You can ZIP everything up and then attach it to a post by clicking +Insert -> Add File.

Thanks a lot, Dave!

Thanks for the files. Two things:
- To create a "frame" around a rectangular <shape>, you need to put another, slightly larger rectangular <shape> with a different color behind it.
- Your drag & drop doesn't work because you've specified the drop sources as valid responses. It's the drop targets (drop1 to drop10) that need to be the valid responses.

Overall, this example here should be a good model for what you want to do:

<block myblock>
/ trials = [1=start]
</block>

<data>
/ columns = (date,time,group,subject,build,blocknum,trialnum,blockcode,trialcode,pretrialpause,posttrialpause,trialduration,trialtimeout,response,correct,latency,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,
  values.box1, values.box2, values.box3, values.box4, values.box5, values.box6)
</data>

<values>
/ box1 = ""
/ box2 = ""
/ box3 = ""
/ box4 = ""
/ box5 = ""
/ box6 = ""
</values>

<trial mytrial>
/ ontrialbegin = [
shape.pos1.droptarget = expressions.available_p1_slots;
shape.pos2.droptarget = expressions.available_p2_slots;
shape.pos3.droptarget = expressions.available_p3_slots;
shape.pos4.droptarget = expressions.available_p4_slots;
shape.pos5.droptarget = expressions.available_p5_slots;
shape.pos6.droptarget = expressions.available_p6_slots;
]

/ ontrialend = [
shape.pos1.droptarget = expressions.available_p1_slots;
shape.pos2.droptarget = expressions.available_p2_slots;
shape.pos3.droptarget = expressions.available_p3_slots;
shape.pos4.droptarget = expressions.available_p4_slots;
shape.pos5.droptarget = expressions.available_p5_slots;
shape.pos6.droptarget = expressions.available_p6_slots;
]

/ stimulustimes = [0 = pos1,pos2,pos3,pos4,pos5,pos6,A,B,C,D,E,F,G,H,I,J,K,L,posrep1,posrep2,posrep3,posrep4,posrep5,posrep6,posrep2_1,posrep2_2,posrep2_3,posrep2_4,posrep2_5,posrep2_6,
RVSL]
/ validresponse = (pos1,pos2,pos3,pos4,pos5,pos6)
/ isvalidresponse = [
if (trial.mytrial.response == "pos1")
{
values.p1_count += 1;
shape.pos1.droptarget;
}
else if (trial.mytrial.response == "pos2")
{
values.p2_count += 1;
shape.pos2.droptarget;
}
else if (trial.mytrial.response == "pos3")
{
values.p3_count += 1;
shape.pos3.droptarget;
}
else if (trial.mytrial.response == "pos4")
{
values.p4_count += 1;
shape.pos4.droptarget;
}
else if (trial.mytrial.response == "pos5")
{
values.p5_count += 1;
shape.pos5.droptarget;
}
else if (trial.mytrial.response == "pos6")
{
values.p6_count += 1;
shape.pos6.droptarget;
}
else
true;
]
/ inputdevice = dragdrop
/ branch = [
if ((expressions.available_p1_slots + expressions.available_p2_slots + expressions.available_p3_slots + expressions.available_p4_slots + expressions.available_p5_slots + expressions.available_p6_slots) <= 0) trial.yousure else trial.mytrial
]
</trial>

<expressions>
/ available_p1_slots = if(
(text.A.hposition==25 && text.A.vposition==80) ||
(text.B.hposition==25 && text.B.vposition==80) ||
(text.C.hposition==25 && text.C.vposition==80) ||
(text.D.hposition==25 && text.D.vposition==80) ||
(text.E.hposition==25 && text.E.vposition==80) ||
(text.F.hposition==25 && text.F.vposition==80) ||
(text.G.hposition==25 && text.G.vposition==80) ||
(text.H.hposition==25 && text.H.vposition==80) ||
(text.I.hposition==25 && text.I.vposition==80) ||
(text.J.hposition==25 && text.J.vposition==80) ||
(text.K.hposition==25 && text.K.vposition==80) ||
(text.L.hposition==25 && text.L.vposition==80)
)
false else true;
/ available_p2_slots = if(
(text.A.hposition==35 && text.A.vposition==80) ||
(text.B.hposition==35 && text.B.vposition==80) ||
(text.C.hposition==35 && text.C.vposition==80) ||
(text.D.hposition==35 && text.D.vposition==80) ||
(text.E.hposition==35 && text.E.vposition==80) ||
(text.F.hposition==35 && text.F.vposition==80) ||
(text.G.hposition==35 && text.G.vposition==80) ||
(text.H.hposition==35 && text.H.vposition==80) ||
(text.I.hposition==35 && text.I.vposition==80) ||
(text.J.hposition==35 && text.J.vposition==80) ||
(text.K.hposition==35 && text.K.vposition==80) ||
(text.L.hposition==35 && text.L.vposition==80)
)
false else true;
/ available_p3_slots = if(
(text.A.hposition==45 && text.A.vposition==80) ||
(text.B.hposition==45 && text.B.vposition==80) ||
(text.C.hposition==45 && text.C.vposition==80) ||
(text.D.hposition==45 && text.D.vposition==80) ||
(text.E.hposition==45 && text.E.vposition==80) ||
(text.F.hposition==45 && text.F.vposition==80) ||
(text.G.hposition==45 && text.G.vposition==80) ||
(text.H.hposition==45 && text.H.vposition==80) ||
(text.I.hposition==45 && text.I.vposition==80) ||
(text.J.hposition==45 && text.J.vposition==80) ||
(text.K.hposition==45 && text.K.vposition==80) ||
(text.L.hposition==45 && text.L.vposition==80)
)
false else true;
/ available_p4_slots = if(
(text.A.hposition==55 && text.A.vposition==80) ||
(text.B.hposition==55 && text.B.vposition==80) ||
(text.C.hposition==55 && text.C.vposition==80) ||
(text.D.hposition==55 && text.D.vposition==80) ||
(text.E.hposition==55 && text.E.vposition==80) ||
(text.F.hposition==55 && text.F.vposition==80) ||
(text.G.hposition==55 && text.G.vposition==80) ||
(text.H.hposition==55 && text.H.vposition==80) ||
(text.I.hposition==55 && text.I.vposition==80) ||
(text.J.hposition==55 && text.J.vposition==80) ||
(text.K.hposition==55 && text.K.vposition==80) ||
(text.L.hposition==55 && text.L.vposition==80)
)
false else true;
/ available_p5_slots = if(
(text.A.hposition==65 && text.A.vposition==80) ||
(text.B.hposition==65 && text.B.vposition==80) ||
(text.C.hposition==65 && text.C.vposition==80) ||
(text.D.hposition==65 && text.D.vposition==80) ||
(text.E.hposition==65 && text.E.vposition==80) ||
(text.F.hposition==65 && text.F.vposition==80) ||
(text.G.hposition==65 && text.G.vposition==80) ||
(text.H.hposition==65 && text.H.vposition==80) ||
(text.I.hposition==65 && text.I.vposition==80) ||
(text.J.hposition==65 && text.J.vposition==80) ||
(text.K.hposition==65 && text.K.vposition==80) ||
(text.L.hposition==65 && text.L.vposition==80)
)
false else true;
/ available_p6_slots = if(
(text.A.hposition==75 && text.A.vposition==80) ||
(text.B.hposition==75 && text.B.vposition==80) ||
(text.C.hposition==75 && text.C.vposition==80) ||
(text.D.hposition==75 && text.D.vposition==80) ||
(text.E.hposition==75 && text.E.vposition==80) ||
(text.F.hposition==75 && text.F.vposition==80) ||
(text.G.hposition==75 && text.G.vposition==80) ||
(text.H.hposition==75 && text.H.vposition==80) ||
(text.I.hposition==75 && text.I.vposition==80) ||
(text.J.hposition==75 && text.J.vposition==80) ||
(text.K.hposition==75 && text.K.vposition==80) ||
(text.L.hposition==75 && text.L.vposition==80)
)
false else true;
</expressions>

<expressions>
/ a =
  if (text.A.hposition == 25 && text.A.vposition == 80) {
   values.box1 = "A";
  }
  else if (text.A.hposition == 35 && text.A.vposition == 80) {
   values.box2 = "A";
  }
  else if (text.A.hposition == 45 && text.A.vposition == 80) {
   values.box3 = "A";
  }
  else if (text.A.hposition == 55 && text.A.vposition == 80) {
   values.box4 = "A";
  }
  else if (text.A.hposition == 65 && text.A.vposition == 80) {
   values.box5 = "A";
  }
  else if (text.A.hposition == 75 && text.A.vposition == 80) {
   values.box6 = "A";
  };
/ b =
  if (text.B.hposition == 25 && text.B.vposition == 80) {
   values.box1 = "B";
  }
  else if (text.B.hposition == 35 && text.B.vposition == 80) {
   values.box2 = "B";
  }
  else if (text.B.hposition == 45 && text.B.vposition == 80) {
   values.box3 = "B";
  }
  else if (text.B.hposition == 55 && text.B.vposition == 80) {
   values.box4 = "B";
  }
  else if (text.B.hposition == 65 && text.B.vposition == 80) {
   values.box5 = "B";
  }
  else if (text.B.hposition == 75 && text.B.vposition == 80) {
   values.box6 = "B";
  };
/ c =
  if (text.C.hposition == 25 && text.C.vposition == 80) {
   values.Box1 = "C";
  }
  else if (text.C.hposition == 35 && text.C.vposition == 80) {
   values.Box2 = "C";
  }
  else if (text.C.hposition == 45 && text.C.vposition == 80) {
   values.Box3 = "C";
  }
  else if (text.C.hposition == 55 && text.C.vposition == 80) {
   values.Box4 = "C";
  }
  else if (text.C.hposition == 65 && text.C.vposition == 80) {
   values.Box5 = "C";
  }
  else if (text.C.hposition == 75 && text.C.vposition == 80) {
   values.Box6 = "C";
  };
/ d =
  if (text.D.hposition == 25 && text.D.vposition == 80) {
   values.Box1 = "D";
  }
  else if (text.D.hposition == 35 && text.D.vposition == 80) {
   values.Box2 = "D";
  }
  else if (text.D.hposition == 45 && text.D.vposition == 80) {
   values.Box3 = "D";
  }
  else if (text.D.hposition == 55 && text.D.vposition == 80) {
   values.Box4 = "D";
  }
  else if (text.D.hposition == 65 && text.D.vposition == 80) {
   values.Box5 = "D";
  }
  else if (text.D.hposition == 75 && text.D.vposition == 80) {
   values.Box6 = "D";
  }
/ e =
  if (text.E.hposition == 25 && text.E.vposition == 80) {
   values.Box1 = "E";
  }
  else if (text.E.hposition == 35 && text.E.vposition == 80) {
   values.Box2 = "E";
  }
  else if (text.E.hposition == 45 && text.E.vposition == 80) {
   values.Box3 = "E";
  }
  else if (text.E.hposition == 55 && text.E.vposition == 80) {
   values.Box4 = "E";
  }
  else if (text.E.hposition == 65 && text.E.vposition == 80) {
   values.Box5 = "E";
  }
  else if (text.E.hposition == 75 && text.E.vposition == 80) {
   values.Box6 = "E";
  };
/ f =
  if (text.F.hposition == 25 && text.F.vposition == 80) {
   values.Box1 = "F";
  }
  else if (text.F.hposition == 35 && text.F.vposition == 80) {
   values.Box2 = "F";
  }
  else if (text.F.hposition == 45 && text.F.vposition == 80) {
   values.Box3 = "F";
  }
  else if (text.F.hposition == 55 && text.F.vposition == 80) {
   values.Box4 = "F";
  }
  else if (text.F.hposition == 65 && text.F.vposition == 80) {
   values.Box5 = "F";
  }
  else if (text.F.hposition == 75 && text.F.vposition == 80) {
   values.Box6 = "F";
  };
/ g =
  if (text.G.hposition == 25 && text.G.vposition == 80) {
   values.Box1 = "G";
  }
  else if (text.G.hposition == 35 && text.G.vposition == 80) {
   values.Box2 = "G";
  }
  else if (text.G.hposition == 45 && text.G.vposition == 80) {
   values.Box3 = "G";
  }
  else if (text.G.hposition == 55 && text.G.vposition == 80) {
   values.Box4 = "G";
  }
  else if (text.G.hposition == 65 && text.G.vposition == 80) {
   values.Box5 = "G";
  }
  else if (text.G.hposition == 75 && text.G.vposition == 80) {
   values.Box6 = "G";
  };
/ h =
  if (text.H.hposition == 25 && text.H.vposition == 80) {
   values.Box1 = "H";
  }
  else if (text.H.hposition == 35 && text.H.vposition == 80) {
   values.Box2 = "H";
  }
  else if (text.H.hposition == 45 && text.H.vposition == 80) {
   values.Box3 = "H";
  }
  else if (text.H.hposition == 55 && text.H.vposition == 80) {
   values.Box4 = "H";
  }
  else if (text.H.hposition == 65 && text.H.vposition == 80) {
   values.Box5 = "H";
  }
  else if (text.H.hposition == 75 && text.H.vposition == 80) {
   values.Box6 = "H";
  };
/ i =
  if (text.I.hposition == 25 && text.I.vposition == 80) {
   values.Box1 = "I";
  }
  else if (text.I.hposition == 35 && text.I.vposition == 80) {
   values.Box2 = "I";
  }
  else if (text.I.hposition == 45 && text.I.vposition == 80) {
   values.Box3 = "I";
  }
  else if (text.I.hposition == 55 && text.I.vposition == 80) {
   values.Box4 = "I";
  }
  else if (text.I.hposition == 65 && text.I.vposition == 80) {
   values.Box5 = "I";
  }
  else if (text.I.hposition == 75 && text.I.vposition == 80) {
   values.Box6 = "I";
  };
/ j =
  if (text.J.hposition == 25 && text.J.vposition == 80) {
   values.Box1 = "J";
  }
  else if (text.J.hposition == 35 && text.J.vposition == 80) {
   values.Box2 = "J";
  }
  else if (text.J.hposition == 45 && text.J.vposition == 80) {
   values.Box3 = "J";
  }
  else if (text.J.hposition == 55 && text.J.vposition == 80) {
   values.Box4 = "J";
  }
  else if (text.J.hposition == 65 && text.J.vposition == 80) {
   values.Box5 = "J";
  }
  else if (text.J.hposition == 75 && text.J.vposition == 80) {
   values.Box6 = "J";
  };
/ k =
  if (text.K.hposition == 25 && text.K.vposition == 80) {
   values.Box1 = "K";
  }
  else if (text.K.hposition == 35 && text.K.vposition == 80) {
   values.Box2 = "K";
  }
  else if (text.K.hposition == 45 && text.K.vposition == 80) {
   values.Box3 = "K";
  }
  else if (text.K.hposition == 55 && text.K.vposition == 80) {
   values.Box4 = "K";
  }
  else if (text.K.hposition == 65 && text.K.vposition == 80) {
   values.Box5 = "K";
  }
  else if (text.K.hposition == 75 && text.K.vposition == 80) {
   values.Box6 = "K";
  };
/ l =
  if (text.L.hposition == 25 && text.L.vposition == 80) {
   values.Box1 = "L";
  }
  else if (text.L.hposition == 35 && text.L.vposition == 80) {
   values.Box2 = "L";
  }
  else if (text.L.hposition == 45 && text.L.vposition == 80) {
   values.Box3 = "L";
  }
  else if (text.L.hposition == 55 && text.L.vposition == 80) {
   values.Box4 = "L";
  }
  else if (text.L.hposition == 65 && text.L.vposition == 80) {
   values.Box5 = "L";
  }
  else if (text.L.hposition == 75 && text.L.vposition == 80) {
   values.Box6 = "L";
  };
/ check_all = {
expressions.a; expressions.b; expressions.c; expressions.d; expressions.e; expressions.f;
expressions.g; expressions.h; expressions.i; expressions.j; expressions.k; expressions.l;
}
</expressions>


<values>
/ p1_count = 0
/ p2_count = 0
/ p3_count = 0
/ p4_count = 0
/ p5_count = 0
/ p6_count = 0
</values>

<trial start>
/ ontrialbegin = [
values.p1_count=0;
values.p2_count=0;
values.p3_count=0;
values.p4_count=0;
values.p5_count=0;
values.p6_count=0;
text.A.hposition = 25%;
text.A.vposition = 40%;
text.B.hposition = 35%;
text.B.vposition = 40%;
text.C.hposition = 45%;
text.C.vposition = 40%;
text.D.hposition = 55%;
text.D.vposition = 40%;
text.E.hposition = 65%;
text.E.vposition = 40%;
text.F.hposition = 75%;
text.F.vposition = 40%;
text.G.hposition = 25%;
text.G.vposition = 60%;
text.H.hposition = 35%;
text.H.vposition = 60%;
text.I.hposition = 45%;
text.I.vposition = 60%;
text.J.hposition = 55%;
text.J.vposition = 60%;
text.K.hposition = 65%;
text.K.vposition = 60%;
text.L.hposition = 75%;
text.L.vposition = 60%;
]
/ branch = [
trial.mytrial
]
/ trialduration = 0
</trial>

<trial yousure>
/ stimulusframes = [1=pos1,pos2,pos3,pos4,pos5,pos6,A,B,C,D,E,F,G,H,I,J,K,L,posrep1,posrep2,posrep3,posrep4,posrep5,posrep6,posrep2_1,posrep2_2,posrep2_3,posrep2_4,posrep2_5,posrep2_6,
RVSL,endtext]
/ validresponse = (30,38)
]
/ branch = [
if (trial.yousure.response == 30) trial.start else trial.end
]
</trial>

<trial end>
/ ontrialbegin = [
expressions.check_all;
]
/ stimulusframes = [1=pos1,pos2,pos3,pos4,pos5,pos6,A,B,C,D,E,F,G,H,I,J,K,L,posrep1,posrep2,posrep3,posrep4,posrep5,posrep6,posrep2_1,posrep2_2,posrep2_3,posrep2_4,posrep2_5,posrep2_6,
RVSL,endtext2]

/ validresponse = (28)
</trial>

<text endtext>
/ items = ("Press A if you are NOT happy with the order of the shapes above, otherwise press L.")
/ position = (50,92)
/fontstyle = ("Arial", 3%, false, false, false, false, 5, 0)
</text>

<text endtext2>
/ items = ("Press ENTER to continue.")
/ position = (50,92)
/fontstyle = ("Arial", 3%, false, false, false, false, 5, 0)
</text>

<text RVSL>
/ items = RVSL
/ position = (50,32)
/fontstyle = ("Arial", 3%, false, false, false, false, 5, 0)
/txcolor = black
/txbgcolor = (transparent)
/resetinterval = 3
/size = (80%,50%)
/ txbgcolor = transparent
</text>

<item RVSL>
/1 = "Please rank the shapes you saw by the order that you think they appeared. For example, put the shape that you think was shown LEAST often in the first box and the shape you think was presented second LEAST often in the second box and so on, until the last box where you will put the shape you think you saw the MOST often.

If you don’t think a shape was presented to you at all, please do not click on that shape."
</item>



<text A>
/ items = ("A.jpg")
/ position = (25,40)
/ dropsource = true
</text>

<text B>
/ items = ("B.jpg")
/ position = (35,40)
/ dropsource = true
</text>

<text C>
/ items = ("C.jpg")
/ position = (45,40)
/ dropsource = true
</text>

<text D>
/ items = ("D.jpg")
/ position = (55,40)
/ dropsource = true
</text>

<text E>
/ items = ("E.jpg")
/ position = (65,40)
/ dropsource = true
</text>

<text F>
/ items = ("F.jpg")
/ position = (75,40)
/ dropsource = true
</text>


<text G>
/ items = ("G.jpg")
/ position = (25,60)
/ dropsource = true
</text>

<text H>
/ items = ("H.jpg")
/ position = (35,60)
/ dropsource = true
</text>

<text I>
/ items = ("I.jpg")
/ position = (45,60)
/ dropsource = true
</text>

<text J>
/ items = ("J.jpg")
/ position = (55,60)
/ dropsource = true
</text>

<text K>
/ items = ("K.jpg")
/ position = (65,60)
/ dropsource = true
</text>

<text L>
/ items = ("L.jpg")
/ position = (75,60)
/ dropsource = true
</text>



<shape pos1>
/ hposition = 25
/ vposition = 80
/ dropposition = (25,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>

<shape pos2>
/ hposition = 35
/ vposition = 80
/ dropposition = (35,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>

<shape pos3>
/ hposition = 45
/ vposition = 80
/ dropposition = (45,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>

<shape pos4>
/ hposition = 55
/ vposition = 80
/ dropposition = (55,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>

<shape pos5>
/ hposition = 65
/ vposition = 80
/ dropposition = (65,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>

<shape pos6>
/ hposition = 75
/ vposition = 80
/ dropposition = (75,80)
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = grey
</shape>


<shape posrep1>
/ hposition = 25
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2>
/ hposition = 35
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep3>
/ hposition = 45
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep4>
/ hposition = 55
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep5>
/ hposition = 65
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep6>
/ hposition = 75
/ vposition = 40
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>


<shape posrep2_1>
/ hposition = 25
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2_2>
/ hposition = 35
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2_3>
/ hposition = 45
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2_4>
/ hposition = 55
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2_5>
/ hposition = 65
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

<shape posrep2_6>
/ hposition = 75
/ vposition = 60
/ shape = rectangle
/ droptarget = true
/ size = (170,170)
/ color = lightgrey
</shape>

Hi Dave,

thanks a bunch!
That goes pretty much in the direction of what we need! I have my frames now, and the dragging is working, however, the dropping is not working yet. I am working on my script at the moment, and I have a few questions concerning the example script you posted:

What exactly is meant by p1_count and which expression part is "responsible" for the dropping?

Sorry, I have never used expressions before.
Attached, you can find what I have so far. test1.iqx is running (without dropping), test2.iqx is not running, because I started to write the expressions.


Thank you again and in advance!
M
By Dave - 6/18/2019

mongrel - 6/19/2019

Hi Dave,

thanks a bunch!
That goes pretty much in the direction of what we need! I have my frames now, and the dragging is working, however, the dropping is not working yet. I am working on my script at the moment, and I have a few questions concerning the example script you posted:

What exactly is meant by p1_count and which expression part is "responsible" for the dropping?

Sorry, I have never used expressions before.
Attached, you can find what I have so far. test1.iqx is running (without dropping), test2.iqx is not running, because I started to write the expressions.


Thank you again and in advance!
M

The expressions determine whether a given drop space is already occupied or not. If it is occupied, it is set to no longer be a drop target. If it is emptied again because the participant is revising her response / changing the ranking, it is set as a drop target again. Otherwise, you'd be in a situation where multiple stimuli could be dropped on the same target (that is: rank position in your case), and that's not what you need if I understand what you ultimately want to do correctly.

The dragging and dropping is working fine in your test1.iqx script. You just need to keep running the trial, instead of just running a single instance.

<data>
/ columns = (date,time,subject,blocknum,trialnum,blockcode,trialcode,trialduration,response,latency,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,
values.drop1, values.drop2, values.drop3, values.drop4, values.drop5, values.drop6, values.drop7, values.drop8, values.drop9, values.drop10)
</data>

VALUES

<values>
/ drop1 = ""
/ drop2 = ""
/ drop3 = ""
/ drop4 = ""
/ drop5 = ""
/ drop6 = ""
/ drop7 = ""
/ drop8 = ""
/ drop9 = ""
/ drop10 = ""
</values>

TEXT ITEMS

<text instruct>
/items = ("
Bitte sortieren Sie die folgenden
körperlichen Merkmale und Fähigkeiten
nach Wichtigkeit. Es geht darum, was
für Sie bzgl. Ihres eigenen Körpers
wichtig ist. Ziehen Sie bitte das wichtigste
Merkmal oder die wichtigste Fähigkeit mit
Hilfe der Maustaste in denobersten
grauen Kasten. Das zweitwichtigste
Merkmal kommt in den zweiten Kasten
und so weiter. Hierbei gibt es kein
Richtig oder Falsch. Was zählt ist, was
Ihnen an Ihrem Körper besonders wichtig
bzw. unwichtig ist.
")
/ position = (12%, 18%)
</text>


<text energy>
/items = ("Energie")
/ position = (30%, 5%)
/ dropsource = true
</text>

<text health>
/items = ("Gesundheit")
/ position = (30%, 15%)
/ dropsource = true
</text>

<text weight>
/items = ("Gewicht")
/ position = (30%, 25%)
/ dropsource = true
</text>

<text bodystrength>
/items = ("Körperkraft")
/ position = (30%, 35%)
/ dropsource = true
</text>

<text bodyattr>
/items = ("Körperliche Attraktivität")
/ position = (30%, 45%)
/ dropsource = true
</text>

<text bodyfit>
/items = ("Körperliche Fitness")
/ position = (30%, 55%)
/ dropsource = true
</text>

<text bodymeas>
/items = ("Körpermaße, z.B.: Brust, Taille, Hüfte")
/ position = (30%, 65%)
/ dropsource = true
</text>

<text coordination>
/items = ("Physische Koordination")
/ position = (30%, 75%)
/ dropsource = true
</text>

<text sexappeal>
/items = ("Sex-Appeal")
/ position = (30%, 85%)
/ dropsource = true
</text>

<text vismusbody>
/items = ("Sichtbar muskulöser Körper")
/ position = (30%, 95%)
/ dropsource = true
</text>


SHAPES

<shape drop1>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 5%)
/ color = lightgray
</shape>


<shape drop2>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 15%)
/ color = lightgray
</shape>


<shape drop3>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 25%)
/ color = lightgray
</shape>


<shape drop4>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 35%)
/ color = lightgray
</shape>


<shape drop5>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 45%)
/ color = lightgray
</shape>


<shape drop6>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%,55%)
/ color = lightgray
</shape>


<shape drop7>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 65%)
/ color = lightgray
</shape>


<shape drop8>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 75%)
/ color = lightgray
</shape>


<shape drop9>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 85%)
/ color = lightgray
</shape>


<shape drop10>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 95%)
/ color = lightgray
</shape>

<shape drop1f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 5%)
/ color = black
</shape>


<shape drop2f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 15%)
/ color = black
</shape>


<shape drop3f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 25%)
/ color = black
</shape>


<shape drop4f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 35%)
/ color = black
</shape>


<shape drop5f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 45%)
/ color = black
</shape>


<shape drop6f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%,55%)
/ color = black
</shape>


<shape drop7f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 65%)
/ color = black
</shape>


<shape drop8f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 75%)
/ color = black
</shape>


<shape drop9f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 85%)
/ color = black
</shape>


<shape drop10f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 95%)
/ color = black
</shape>

<shape instrshape>
/shape = rectangle
/ size = (450, 450)
/ position = (12%, 15%)
/ color = lightgray
</shape>


<trial SOQ>

/ stimulusframes = [1= instrshape, instruct; 2 = drop1f, drop2f, drop3f, drop4f, drop5f, drop6f, drop7f, drop8f, drop9f, drop10f; 3= drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10, energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight,health ]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10)
/ branch = [
trial.SOQ
]

</trial>

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

<expt SOQ>
/ blocks = [1=SOQ]
</expt>



By mongrel - 6/19/2019

Dave - 6/19/2019
mongrel - 6/19/2019

Hi Dave,

thanks a bunch!
That goes pretty much in the direction of what we need! I have my frames now, and the dragging is working, however, the dropping is not working yet. I am working on my script at the moment, and I have a few questions concerning the example script you posted:

What exactly is meant by p1_count and which expression part is "responsible" for the dropping?

Sorry, I have never used expressions before.
Attached, you can find what I have so far. test1.iqx is running (without dropping), test2.iqx is not running, because I started to write the expressions.


Thank you again and in advance!
M

The expressions determine whether a given drop space is already occupied or not. If it is occupied, it is set to no longer be a drop target. If it is emptied again because the participant is revising her response / changing the ranking, it is set as a drop target again. Otherwise, you'd be in a situation where multiple stimuli could be dropped on the same target (that is: rank position in your case), and that's not what you need if I understand what you ultimately want to do correctly.

The dragging and dropping is working fine in your test1.iqx script. You just need to keep running the trial, instead of just running a single instance.

<data>
/ columns = (date,time,subject,blocknum,trialnum,blockcode,trialcode,trialduration,response,latency,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,stimulusnumber,stimulusitem,stimulusonset,
values.drop1, values.drop2, values.drop3, values.drop4, values.drop5, values.drop6, values.drop7, values.drop8, values.drop9, values.drop10)
</data>

VALUES

<values>
/ drop1 = ""
/ drop2 = ""
/ drop3 = ""
/ drop4 = ""
/ drop5 = ""
/ drop6 = ""
/ drop7 = ""
/ drop8 = ""
/ drop9 = ""
/ drop10 = ""
</values>

TEXT ITEMS

<text instruct>
/items = ("
Bitte sortieren Sie die folgenden
körperlichen Merkmale und Fähigkeiten
nach Wichtigkeit. Es geht darum, was
für Sie bzgl. Ihres eigenen Körpers
wichtig ist. Ziehen Sie bitte das wichtigste
Merkmal oder die wichtigste Fähigkeit mit
Hilfe der Maustaste in denobersten
grauen Kasten. Das zweitwichtigste
Merkmal kommt in den zweiten Kasten
und so weiter. Hierbei gibt es kein
Richtig oder Falsch. Was zählt ist, was
Ihnen an Ihrem Körper besonders wichtig
bzw. unwichtig ist.
")
/ position = (12%, 18%)
</text>


<text energy>
/items = ("Energie")
/ position = (30%, 5%)
/ dropsource = true
</text>

<text health>
/items = ("Gesundheit")
/ position = (30%, 15%)
/ dropsource = true
</text>

<text weight>
/items = ("Gewicht")
/ position = (30%, 25%)
/ dropsource = true
</text>

<text bodystrength>
/items = ("Körperkraft")
/ position = (30%, 35%)
/ dropsource = true
</text>

<text bodyattr>
/items = ("Körperliche Attraktivität")
/ position = (30%, 45%)
/ dropsource = true
</text>

<text bodyfit>
/items = ("Körperliche Fitness")
/ position = (30%, 55%)
/ dropsource = true
</text>

<text bodymeas>
/items = ("Körpermaße, z.B.: Brust, Taille, Hüfte")
/ position = (30%, 65%)
/ dropsource = true
</text>

<text coordination>
/items = ("Physische Koordination")
/ position = (30%, 75%)
/ dropsource = true
</text>

<text sexappeal>
/items = ("Sex-Appeal")
/ position = (30%, 85%)
/ dropsource = true
</text>

<text vismusbody>
/items = ("Sichtbar muskulöser Körper")
/ position = (30%, 95%)
/ dropsource = true
</text>


SHAPES

<shape drop1>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 5%)
/ color = lightgray
</shape>


<shape drop2>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 15%)
/ color = lightgray
</shape>


<shape drop3>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 25%)
/ color = lightgray
</shape>


<shape drop4>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 35%)
/ color = lightgray
</shape>


<shape drop5>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 45%)
/ color = lightgray
</shape>


<shape drop6>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%,55%)
/ color = lightgray
</shape>


<shape drop7>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 65%)
/ color = lightgray
</shape>


<shape drop8>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 75%)
/ color = lightgray
</shape>


<shape drop9>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 85%)
/ color = lightgray
</shape>


<shape drop10>
/ shape = rectangle
/ size = (250, 60)
/ droptarget = true
/ position = (70%, 95%)
/ color = lightgray
</shape>

<shape drop1f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 5%)
/ color = black
</shape>


<shape drop2f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 15%)
/ color = black
</shape>


<shape drop3f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 25%)
/ color = black
</shape>


<shape drop4f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 35%)
/ color = black
</shape>


<shape drop5f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 45%)
/ color = black
</shape>


<shape drop6f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%,55%)
/ color = black
</shape>


<shape drop7f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 65%)
/ color = black
</shape>


<shape drop8f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 75%)
/ color = black
</shape>


<shape drop9f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 85%)
/ color = black
</shape>


<shape drop10f>
/ shape = rectangle
/ size = (255, 65)
/ droptarget = true
/ position = (70%, 95%)
/ color = black
</shape>

<shape instrshape>
/shape = rectangle
/ size = (450, 450)
/ position = (12%, 15%)
/ color = lightgray
</shape>


<trial SOQ>

/ stimulusframes = [1= instrshape, instruct; 2 = drop1f, drop2f, drop3f, drop4f, drop5f, drop6f, drop7f, drop8f, drop9f, drop10f; 3= drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10, energy, vismusbody, sexappeal, coordination, bodymeas, bodyfit, bodyattr, bodystrength, weight,health ]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (drop1, drop2, drop3, drop4, drop5, drop6, drop7, drop8, drop9, drop10)
/ branch = [
trial.SOQ
]

</trial>

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

<expt SOQ>
/ blocks = [1=SOQ]
</expt>




Oh wow, that wasn`t too difficult! Thank you so much!