[solved] Modifying a the value of a variable depending of subject's responses on a touch tablet
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!