Howdy, Stranger!

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

Supported by

Need help with creating a simple experiment

I want to use open sesame to create a simple experiment.

I want opensesame to count the number of times the key is pressed by the participant in 40 seconds and how fast the key is pressed and i have no clue of how to do this.

help!

Comments

  • Hi,

    I hope this scripts gets you started. In any case, you should check out our documentations and examples. So that you get more experienced with programming.

    ms = Mouse()
    cv = Canvas()
    cv.text = "Click as fast as you can"
    responses = []
    t0 =cv.show()
    while clock.time()-t0<40000: 
        button, pos, time = ms.get_click(timeout = 0)
        if button != None:
             responses.append([button,time-t0]) # store which key was pressed and the time since begin of trial
             # So to get the number of clicks, take the length of that list. Does that make sense
    

    Does that make sense?

    Eduard

Sign In or Register to comment.