# Sliders in different position

We try to make 3 sliders in different position that change randomly (3 states): (0, -350), (120, -350), (-120, -350) (in pixels).
In the code we wrote that only one would appear in each routine.
However, the three sliders appear together. (We are looking for more ways to do that, without success)
We would appreciate it if you had an idea what is wrong in the code,
Thanks!

Begin Experimant:
sliders = (‘sliderCenter’, ‘sliderLeft’, ‘sliderRight’)
slidersList = (‘sliderCenter’, ‘sliderLeft’, ‘sliderRight’)
slidersList = ()

Begin Routine:
if Routine.thisN == 0:
sliderCenter.started = 1
sliderLeft.started = 0
sliderRight.started = 0

elif Routine.thisN == 1:
sliderCenter.started = 0
sliderLeft.started = 1
sliderRight.started = 0

elif Routine.thisN == 2:
sliderCenter.started = 0
sliderLeft.started = 0
sliderRight.started = 1

What about changing the start time of the sliders?
For example, each slider will have its variable as the start time:

And then the following code:

``````if trials.thisN == 0:
slider_1_start = 0
slider_2_start = 9999
slider_3_start = 9999
elif trials.thisN == 1:
slider_1_start = 9999
slider_2_start = 0
slider_3_start = 9999
else:
slider_1_start = 9999
slider_2_start = 9999
slider_3_start = 0
``````

Not sure this is the best solution, but I think it will work here.

Thank you!
It worked for one round of stimuli (3 times it appeared in a different position), but then only one slider appeared (the last one in the code).
What can be added to make the code repeat itself randomly?

This is because `trials.thisN` is equal to 0 on the first iteration, to 1 on the second, and to 2 on the third iteration.
If you want it to be sequential, you can do the following:

``````if trials.thisN % 3 == 0:
slider_1_start = 0
slider_2_start = 9999
slider_3_start = 9999
elif trials.thisN % 3 == 1:
slider_1_start = 9999
slider_2_start = 0
slider_3_start = 9999
else:
slider_1_start = 9999
slider_2_start = 9999
slider_3_start = 0
``````

If you want it to be random, you can try the following:

``````# Start Routine
num = randint(0,3)
if num % 3 == 0:
slider_1_start = 0
slider_2_start = 9999
slider_3_start = 9999
elif num % 3 == 1:
slider_1_start = 9999
slider_2_start = 0
slider_3_start = 9999
else:
slider_1_start = 9999
slider_2_start = 9999
slider_3_start = 0
``````

Thank you very much!
I would like one more question - the data regarding the position of clicking on the slider appears in the data separately (different variables). How can they be united under the same variable?

In the code I made a list and asked it to export this data, but it remained empty in the Excel file:
#Begin Experiment
slidersList = (‘sliderCenter’, ‘sliderLeft’, ‘sliderRight’)
slidersList = ()

slidersList = ‘’