Howdy, Stranger!

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

Supported by

[solved] Modifying a the value of a variable depending of subject's responses on a touch tablet

edited January 2014 in OpenSesame

Hi everyone,

I hope you guys had a great Christmas break!

I'm very happy to tell you that opensesame worked well with the new ASUS transformer tablet with windows 8.

My experiment works well thanks to you (http://www.cogsci.nl/forum/index.php?p=/discussion/comment/2812#Comment_2812). Thanks again Sebastian.

I have however a final question that is probably obvious for experts in python, but I can't fix it.

In my experiment, if the subject touch a specific button, the trial starts again:

 # If participant gave an incorrect response:
if self.get('response_reponse_tac') == 2:
    # Prepare the whole trial sequence (here called
    # 'trial_sequence') again:
    exp.items['trial_sequence'].prepare()
    # And run it again:
    exp.items['trial_sequence'].run()

However, I would like to know if it is somehow possible to modify a variable namely the [wait] variable corresponding to the duration of the touchresponse:

set _nrow "1"
set _ncol "2"
set description "A grid-based response item, convenient for touch screens"
set timeout "[wait]"

The value of this variable is indicated in the blockloop table. I tried to add the following inline before the one who restart the trial:

if self.get('response_reponse_tac') == 2:
    exp.set('wait', self.get('wait')-[response_time_reponse_tac])

But it does not work. It seems that it does not find the response_time_reponse_tac variable even if I create it in an inline outside the loop.

What I did wrong?
Can you help me?

Thanks a lot for your answer!

And a Happy new year!

Cheers,

Gladys

Comments

  • edited 4:55PM

    hi
    I am not sure but i think that [response_time_reponse_tac] should be
    self.get('response_time_reponse_tac')

  • edited 4:55PM

    Hi,
    It works perfectly!!!!! thanks a lot!!!!!!
    Cheers,
    Gladys

Sign In or Register to comment.