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

My keyboard to chr command


In my experiment, the subject needs to type a sequence of letters so I've inserted a dialog box according to the guidance in another post (text input functions: http://osdoc.cogsci.nl/3.1/manual/forms/widgets/text_input/).

Now I'm trying to create a loop if the sequence that was typed is wrong. If so, the sequence that was last seen will show again and afterward typing dialog box. Only if the sequence typed correctly the next sequence will be presented. I did it according to this post: http://forum.cogsci.nl/index.php?p=/discussion/31/solved-multi-character-keyboard-response-or-simultaneous-sketchpad-and-text-input.

While the sequence typed correctly it's running, but if there were a mistake it's crashing. How can I fix it?

What does the "my.keyboard.to.chr" command do?

I don't need the "SWITCH" command but I don't succeed to delete it correctly.

Thank you!

image.png 313.7K


  • hadasknihadaskni Posts: 10

    Another printScreen of my experiment when it's crashing

    1.png 340.7K
  • eduardeduard Posts: 1,115


    Can you also post the error message? And maybe even upload the experiment? Like that it is hard to tell what is going on.

    Btw. you can try to see what this command does if you try it in the debug window after the experiment crashed.

  • hadasknihadaskni Posts: 10

    Thank you got your help. I've attached the error message and also the experiment itself.

    What should I do?

  • eduardeduard Posts: 1,115

    Ok, that is an indentation error. If you remove the tabs on line 22 and replace them with 8 whitespaces, the error should disappear. Can you try that?


Sign In or Register to comment.