A reaction time task

Using LiveCode in research or teaching of post secondary topics? Share your interests with other academics.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sheldor
Posts: 2
Joined: Mon Apr 09, 2012 3:04 pm

A reaction time task

Post by sheldor » Mon Apr 09, 2012 3:11 pm

Hi LiveCoders!

I am an absolute beginner, but have been tearing my hair out trying to solve this problem. Basically I am creating a reaction time task where the user has to click a box when it appears. The twist is, sometimes a tone will sound and this means the participant must do nothing (it is a response inhibition task). The box should then be shown for 3 seconds, unless the participant clicks it, then it should disappear. I need to record the number of times the participant clicked the button when they shouldn't have.

The problem is, I can't figure out how to do this. Can somebody please help, I can make the button appear for three seconds (using the wait command) and make it disappear when clicked, but I can't seem to work out how to achieve both.

Any help would be greatly appreciated - I have spend hours looking through the user guide and forums and need a bit of help.

Many thanks!

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: A reaction time task

Post by mwieder » Mon Apr 09, 2012 5:15 pm

Use the "wait with messages" form of the wait command, otherwise it will block anything else from happening for the wait period:

Code: Select all

wait 3 seconds with messages

sheldor
Posts: 2
Joined: Mon Apr 09, 2012 3:04 pm

Re: A reaction time task

Post by sheldor » Tue Apr 10, 2012 2:54 am

Thank-you! This works well - I was initially confused by this command and thought it required a conditional... or something! Thanks for clearing things up :D

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: A reaction time task

Post by mwieder » Tue Apr 10, 2012 3:04 am

Yeah, I think that's one of those language constructs that's only intuitive after someone's explained it to you :P

Post Reply

Return to “Research and Post Secondary”