Hi all,
I have a task that I am creating, during which the participant selects a choice from a set of 6 text-buttons, arranged in two columns (2x3). Therefore, there are 6 possible locations for the buttons, and locations cannot be repeated. Right now, the locations are statically set, but I would like to set them at the beginning of the experiment, and then use those locations for the rest of the experiment. Here is a snippet of the text code:
<text happiness>
/ items = ("Happiness")
/ hjustify = center
/ vjustify = center
/ fontstyle = ("Arial",5%, false, false, false, false, 5, 1)
/ txcolor = white
/ txbgcolor = grey
/ position = (30%, 20%) #As you read ahead, this will have to be set from values.happiness_position, or something similar...
/ size = (20%, 10%)
/erase = false
</text>
In order to do it, I thought I may make some variables as such:
<values>
/ anger_position = (0%,0%)
/ happiness_position = (0%,0%)
/ sadness_position = (0%,0%)
/ fear_position = (0%,0%)
/ disgust_position = (0%,0%)
/ surprise_position = (0%,0%)
</values>
And then also have some locations:
<list button_position_1>
/ items = (30%, 20%)
</list>
<list button_position_2>
/ items = (30%, 50%)
</list>
<list button_position_3>
/ items = (30%, 80%)
</list>
<list button_position_4>
/ items = (70%, 20%)
</list>
<list button_position_5>
/ items = (70%, 50%)
</list>
<list button_position_6>
/ items = (70%, 80%)
</list>
Finally, I thought a noreplace would be the solution to set the values, but I do not have the syntax correct:
/ onexptbegin = [values.anger_position, values.happness_position, values.sadness_position, values.fear_position, values.disgust_position, values.surprise_position = noreplace(list.button_position_1.items, list.button_position_2.items, list.button_position_3.items, list.button_position_4.items, list.button_position_5.items,list.button_position_6.items)]
Any suggestions or solutions would be greatly appreciated!
Thanks!
Andy