hide and display running clock upon key-press


Author
Message
clairez
clairez
Guru (5K reputation)Guru (5K reputation)Guru (5K reputation)Guru (5K reputation)Guru (5K reputation)Guru (5K reputation)Guru (5K reputation)Guru (5K reputation)Guru (5K reputation)
Group: Forum Members
Posts: 41, Visits: 49
Hi!

I want to make a prospective memory task in which participants are asked to press a particular key on the keyboard (e.g., Enter) every 10 minutes (while performing some other task in the meantime--here a number discrimination task). Participants can check how much time has elapsed whenever they want by looking at a stopwatch. I don't want the stopwatch to be continuously visible, thought. It should be displayed only when participants press a designated key (e.g., t, for time), and then disappear again. I also want to be able to analyze later on when participants checked the stopwatch and when they pressed the Enter key. This presents a couple of challenges for me.

The first challenge is making the clock visible or invisible. One way to do this, I thought, would be to manipulate its backgroundcolor. If that's the same color as the numbers on the clock and the screencolor, it won't be visible. Now I want to make the clock's backgroundcolor a variable, and specify on each trial what the value of that variable should be depending on the participant's response. Whatever I try, this isn't working. I can't even make the backgroundcolor a variable to begin with.

This is some basic piece of srcipt with which I've experimented.

<clock timer>
/ format = "mm:ss"
/ mode = stopwatch
/ position = (80%, 80%)
/ resetrate = block
/ txbgcolor = timerbgcolor
</clock>

<values>
/ timerbgcolor = ""
</values>

<trial ANYTRIAL>
...
/ ontrialend = [if trial.greeneven.response == 20 values.timer = "(0, 0, 0)" else values.timer = "(255, 255, 255)"]
</trial>

I have a couple more questions, but I think it doesn't make sense to bring them up before I have figured this out. Just one more comment at this point: I want to put the clock in my experimental blocks (using the /bgstim command), rather than in each trial. This is to prevent that the clock isn't displayed during post-trial pauses. I don't know if this will be a problem, since I want to specify the color of the clock in each trial. Sorry if this is a little abstract. I'm happy to explain everything in more detail if somebody thinks he can help me with this problem.

Thanks!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search