Howdy, Stranger!

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

Supported by

Issue with number keyboard responses using Open Sesame OS web

edited March 2020 in OpenSesame

Hi all,

I just programmed an experiment (using Open Sesame 2.8.3) with the purpose of running it online.

A response had to be given by pressing 1 or 2 or 3 or 4 (keyboard_response item). My loop item had a correct_response variable and feedback was given regarding correctness. While this worked perfectly with "Run in window" or "Quick run", all responses (also correct responses!) were taken as incorrect when trying the code out via "Tools -> OSweb -> test experiment in external browser". When using letters as the response options rather than numbers it does work just fine in the external browser.

Are number responses not supported? Anyone an idea what is going on here?

Louisa

Comments

  • Hi Louisa,

    As you say it works with letters, but not with numbers: it may have to do with the type of variable. Letters are string and numbers can be string but also numbers.

    Strings are defined with ''

    str(1)=='1' --> TRUE

    '1'==1 --> FALSE (one side is string the other is not a string so it is not equal)

    Maybe you have such an equation which troubles so.

    Let's say you have put [cor_resp]==1 (one side could be string but the other not). You may try: [cor_resp]=='1'

    i am just guessing, but maybe it helps you to solve it. ;)


    Second, have you also tried the fullscreen mode? Just to check whether it really has to do with OSweb?

    Cheers,

    Stephan

  • Dear Stephan,

    Thanks for your reply. It helped me out!

    Fyi: I don't have any equations or inline scripts to define correctness, I simply defined a variable "correct_response" in the loop (for example 1 in row1, 4 in row2 etc.) and the keyboard response item uses that by default to determine correctness.

    Making the correct_response values strings (for example '1' in row1, '4' in row2 etc.) makes the evaluation of correctness not work in "Run in window"/ "Quick run"/"Run fullscreen", but it does make it work with OSweb.

    Louisa

  • Hi @LouisaB

    I faced the same problem as you. One of my trials' correct responses was numeric, such as 103. I defined the correct_response in the loop, however, my var.response and var.correct_response were the same, but at last, it was still counted as incorrect. I was wondering that did you solve this problem yet?

    PS: It is also not working in either "Run in window" / "Quick run" / "Run full screen".

    TZ

  • Hi @Tzlim,

    Sorry for the very late reply, I didn't log in to the forum for a long while.

    For me, defining correct_response values in the loop as strings strings (so enter for example '103' in row1 instead of 103) made the evaluation of correctness not work in "Run in window"/ "Quick run"/"Run fullscreen", but it did make it work with OSweb running in a browser.

    Do you know actual correct responses are being counted as incorrect because of a feedback screen on every trial immediately after the number response (worth trying!), or because of what is logged (e.g. in the JATOS datafile)?

    If the latter: Is only a single response given on a trial? At the time of my issue OS web would store in var_response only the last response of a trial.

    Best,

    Louisa

Sign In or Register to comment.