Howdy, Stranger!

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

Supported by

Multi-character problems

Dear all,

I ‘m experiencing some difficulties in programing my experience with OpenSesame. Before continuing with the details of my problems, I want to apologize about my poor English and my general lack in python programming knowledge. However, I’ll try to be the clearest I can, but do not hesitate to tell me if you don’t understand what I’m trying to describe.

Well then…

I’m trying to program the Remote Associate Test (RAT) and for this purpose, I need to register multi-character answers. I found on another topic an inline script that was very very helpful (see below), but I still have some problems.

First, I’m not able to make any feedback (for examples, a green/red fixation point and something like the “feedback item” that gives the percentage of correct answers and the average response time) to the participant about if his answer is true or not. I mean that OpenSesame doesn’t seem to understand when a response is true if it’s a multi-character one’s.

Second, I would like to set a response time limit of 25000 ms but I have no clue on how to write it in the inline script.

Third and last, in French language some letters can have an accent like “é”, “è” or “à”, but since the keys to make these accents are the same than the numeric keys, if I try to type one of these letters on my keyboard, it directly considers the number and not the accent. Do you have any method to fix this ?

Thanks in advance!

Adil

Comments

  • Second, I would like to set a response time limit of 25000 ms but I have no clue on how to write it in the inline script.

    instead of while True: you could use while = clock.time()-start_time<25000. If you use that you have to define start time before the while loop.

    Third and last,

    Sorry, can't help with that...

    mean that OpenSesame doesn’t seem to understand when a response is true if it’s a multi-character one’s.

    You can create the correct response yourself. If you have a multicharacter response variable and know what would be the correct response, you can just compare them, and if they are the same, you can set var.correct = 1, else 0.

    Hope this helps,

    Eduard

  • Really thanks for the help !

    However I still don't get how to define "start_time" ? If I assign to "start_time" the value 0, the time won't stop after the current trial, making all following trials to be cancelled instantly. And if I define it as follows "start_time = clock. time", it seems to don't change anything at all.. Do you have any suggestions ?

  • You have to define start time before you enter the loop. Just take the current time: start_time = clock.time()

    Eduard

  • edited November 2018

    The thing is that the clock starts with the first key press but not directly when the item appears on the screen. Do I have to use a thread ?

    Adil

  • I don't understand. When is the clock supposed to start? With stimulus onset or with the first keypress?
    If only with the first keypress, that it doesn't really make sense to make the loop duration contingent on that (what if participant need a minute to make the first key press?). Can you maybe elaborate?

    (and sorry for the late response)

    Eduard

  • Thanks for the answer. The clock is supposed to start after the stimulus presentation (and not at the first keypress). I already find out how to fix my problem.
    Here my solution for anyone who wants to program the RAT with OpenSesame and run into difficulties like me.

    Adil

Sign In or Register to comment.