Howdy, Stranger!

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

Supported by

[open] Limit the time to start input text

edited May 2014 in OpenSesame

My question is very simple (I hope the answer also...) -

I want subjects to recall a sequence (shown with a sketchpad) -
I do this with a form_text_input item -
but I do not want them to "take the time" I want to remind them they need to answer.
Is there a way to wait for their answer (I want to check RT), and yet after some seconds remind them
to answer.

(It seems like I do my research on sleeping people. No, It's just what was asked me to do)

Thank you a lot,
Shilo :)

Comments

  • edited May 2014

    actually,
    I convinced the research-student that she doesn't need the reminder,
    but I have another problem -

    When I (the program) wait for response to the sequence,
    I couldn't actually record it - the first letter is missed,
    and the subject need to rewrite it in second he sees it wasn't writen.

    yes I know - it is saved on the logger, but
    I want the subject won't be confused with what he typed or not.
    If it was keyboard response I'd let the duration be "0",
    but I couldn't do this in the case of input_text_form...

    thank's a lot for reading all these pettiness,

    Shilo Geva

  • edited 2:24PM

    Hi Shilo,

    Do I understand correctly that you use a regular form_text_input, but that this does not register the first typed character? If so, could you post the script of your experiment, or a clearer description of what you're doing precisely?

    Cheers!

    Edwin

  • edited May 2014

    actually,
    I found a script of Sebastian that was mantioned here that suited me.

    http://forum.cogsci.nl/index.php?p=/discussion/31/solved-multi-character-keyboard-response-or-simultaneous-sketchpad-and-text_input/p1

    Now I have another problem. (the oposite one)

    my sequence its:

    fixation

    word (sketchpad with a duration set to 7000)

    word waiting (sketchpad with a duration set to 0)

    the_script

    logger

    I want him to start record the letters only while the second
    scatchpad is shown. but the programm record the letter that was typed
    while the first one was shown.

                        Thanks a lot,
                                Shilo
    
  • edited 2:24PM

    Not sure which script you used, but I assume it's the simpler one (not PyGame specific). I've added two lines in there to call the get_key until all previous input is gone. Now the script should only collect the stuff typed while the second sketchpad is visible.

    # import the stuff we need
    from openexp.canvas import canvas
    from openexp.keyboard import keyboard
    
    # create the instances we need
    my_canvas = canvas(self.experiment)
    my_keyboard = keyboard(self.experiment)
    
    # catch all early responses
    while my_keyboard.get_key(timeout=1)[0] != None:
        pass
    
    # empty string to store the response
    resp = ""
    
    # loop until 'break' is called
    while True:
        # Get a keyboard response
        key, time = my_keyboard.get_key()
        # If return is pressed the loop should be exited
        if key == "return":
            break           
        # Handle backspace by removing the last character
        if key == "backspace":
            resp = resp[:-1]    
        else:
            # add character to response
            resp += key
        # Copy the canvas from a sketchpad called 'my_sketchpad' and
        # overlay the response
        my_canvas.copy(self.experiment.items["my_sketchpad"].canvas)
        my_canvas.text(resp)
        my_canvas.show()    
    # Save the response
    self.experiment.set("response", resp)
    

    Good luck!

    Edwin

Sign In or Register to comment.