[solved] setting cycles
hi
I am trying to define cycle number from a variable and not a specific number.
I tried to edit the loop object as
set cycles [length]
but it didn't worked
any suggestions?
thanks
p.s. - I love using opensesame - you are doing a great job!

Comments
Hi,
For the moment, it is not possible to use a variable for setting the number of cycles. You may want to consider the following solution to run a given sequence for a variable number of times:
1.) Directly append your trial sequence to a block sequence (a block loop is not necessary, because we'll determine the number of cycles ourselves)
2.) Set the Run-if statement of the trial sequence to 'never'
3.) Add an inline_script to the beginning of your block sequence
4.) And put something like the following in its Run phase tab:
I uploaded an example experiment here (download, change the extension to .opensesame and open as normally):
Does that make sense?
Cheers,
Lotje
Did you like my answer? Feel free to

works like a charm!
your solution is very simple and it is now a part of my exp.
before your replay I managed to do it with "repeat_cycle" - can you see a downside to my solution?
thank you very much!
Dror
Hi Dror,
I think your solution is a very good idea!
I can't see any advantages for one approach above the other.
Good luck!
Lotje
Did you like my answer? Feel free to
