Recording multiple responses before stimulus terminates

UMD NCDL marylandncdl at gmail.com
Tue Feb 21 00:01:02 UTC 2012


Hi all,

I am attempting to make a habituation paradigm with E-Prime. In order
to do so, I need to log multiple responses. Using the samples from E-
Primes website I have my program recording multiple responses and
recording button presses and releases. What I need E-Prime to do is
calculate the difference between a button press "N" and release "{-
N}"and terminate the presentation of a movie display when the time
after N is pressed is >= 2000 ms.

I have had the program record the multiple responses and stop cycling
the video when the difference between two responses is > 2000 ms, but
it does not stop until the end of the video. I need it to terminate
during the video! When the max count = 2, then the video will stop
after 2 consecutive seconds. However, infants will look to/away from
the screen multiple times, so I need to record multiple responses.

My guess is that the problem is occuring because the responses are not
logged until the max count is reached. How can I tell E-Prime to log/
use responses prior to reaching the max count?

Here's my code so far:


	Dim theResponseObject As RteRunnableInputObject
	Set theResponseObject =
CRteRunnableInputObject(Rte.GetObject("Fam1Video"))

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

	'Counter variable
	Dim nIndex as Integer

	'Enumerate through the response collection
	'If any of the responses were made by the keyboard, display
	'the statistics to the user.
	For nIndex = 1 To theResponseObject.InputMasks.Responses.Count

		'Set theKeyboardResponseData equal to the current keyboard response
		Dim theKeyboardResponseData As KeyboardResponseData
		Set theKeyboardResponseData =
CKeyboardResponseData(theResponseObject.InputMasks.Responses(nIndex))
		If Not theKeyboardResponseData Is Nothing Then

			'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

	For nIndex = 2 to theResponseObject.InputMasks.Responses.Count
	 If c.GetAttrib("KeyPress" & nIndex & "RT") - c.GetAttrib("KeyPress"
& nIndex-1 & "RT") > 2000 Then Familiarization1.Terminate
	Next

Thank you,
Leslie Rollins

-- 
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