Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Reading multiple pictures to build multiple canvas

edited June 13 in OpenSesame

Is there a way to build multiple canvas? I am thinking of something like this

for i in range(33):
    'COR2_'+str(i) = canvas()
    path = pool['Folie'+str(i+3)+'.tif']
    'COR2_'+str(i).image(path)
    'COR2_'+str(i).present()

Maybe it's idiotic to think like that. However, it would make the code so much shorter :smile:

Comments

  • solved :smiley:

    COR2_list = []
    for i in range(3):
        COR2_list.append(str(i))    
        COR2_list[i] = canvas()
        path = pool['Folie'+str(i+3)+'.tif']
        COR2_list[i].image(path)
        COR2_list[i].show()
        key, time = target.get_key()
        var.Resp = key
        var.Stim='COR2'
    
Sign In or Register to comment.