Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Need help with creating a simple experiment

Mar1Mar1 Posts: 1

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.



  • eduardeduard Posts: 1,170


    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?


    Thanked by 11992
Sign In or Register to comment.