Recording multiple presses and releases before the stimulus offset

PetCPR pdweller22 at googlemail.com
Thu Feb 23 15:14:09 UTC 2012


Hi, I have been trying to program a binocular rivalry paradigm. Here I
want to present two images to the participant, one in red, and one in
cyan for 15 seconds, and the participant must indicate by sequentially
pressing one of three keys, which image is the most dominant. For
example, if the participant is seeing mostly the left  image, they
would hold down one key e.g. "D" if they are seeing mostly the right
the "J" key, and if they see an equal mixture of both, they would
press down the "G" Key. In reality these images  would be competing
quite quickly, so the subject would be switching between the 3
different keys multiple times during the experiment.

I've enabled the collection of presses and releases in the
experimental object, and I've also used script to collect multiple
responses, and these both work fine. However the data for each of the
presses and releases in the output file comes out as:

KeyPress1RT
KeyPress2RT
KeyPress3RT
etc

in this way, the output doesn't code for presses and releases, the
only way to know if it is a release is to at whether of not the
response given is in parenthesis.

Does anyone know how to program eprime to recognize presses and
releases separately?

In addition I would ideally like eprime to calculate the difference
between each press and release and output this in a separate column in
edataid, could anyone tell me the code needed for that?

finally, I would like the specific key pressed and released, and the
RT difference to be assigned to specific columns in the output, for
example:

Dpress1RT
Drelease1RT
Ddifference1
Jpress1RT
Jrelease1RT
Jdifference1
Gpress1RT
Grelease1RT
Gdifference1
Dpress2RT
Drelease2RT
Ddifference2
       ...

Here's a copy of my script so far:

	'Counter variable for the number of responses made
	Dim nPressCount As Long

	'Counter variable
	Dim nIndex as Integer

	For nIndex = 1 To stimulus.InputMasks.Responses.Count


		'Set theKeyboardResponseData equal to the current keyboard response
		Dim theKeyboardResponseData As KeyboardResponseData
		Set theKeyboardResponseData =
CKeyboardResponseData(stimulus.InputMasks.Responses(nIndex))
		If Not theKeyboardResponseData Is Nothing Then
			'Increment the press count
			nPressCount = nPressCount + 1

			'Log reaction time and response for each key press.
			c.SetAttrib "KeyPress" & nIndex & "RT", theKeyboardResponseData.RT
			c.SetAttrib "KeyPress" & nIndex & "RESP",
theKeyboardResponseData.RESP
		End If


	Next 'nIndex



Any help anyone could give would be great, I'm kind of new to
programming so I'm a little lost!

Cheers!

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list