dragdrop expt


Author
Message
mongrel
mongrel
Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)
Group: Forum Members
Posts: 53, Visits: 147
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!

Attachments
SOQ_test.zip (198 views, 13.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
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>

mongrel
mongrel
Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)
Group: Forum Members
Posts: 53, Visits: 147
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

Attachments
SOQ (2).zip (201 views, 7.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
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>




mongrel
mongrel
Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)Guru (5.5K reputation)
Group: Forum Members
Posts: 53, Visits: 147
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!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search