Habituation with E-Prime
cdenicola
cadeni01 at louisville.edu
Thu Aug 13 18:37:40 UTC 2009
Hi all,
I'm currently trying to program a habituation experiment in E-Prime. I
need it to display a stimulus when Enter is pressed, start recording
looking time when 5 is pressed, and stop recording looking time when 5
is released, then one second later removing the stimulus. I also need
to program it to calculate a sliding window to detect when they've
habituated, but that's for another time. Here's some of the script:
dim doAdd as boolean
lookAwayTime = -1
lookAwayStart = -1
trialTimer = MovieDisplay1.FirstFrameTime
'loop to measure looking time via keyboard
do
set theResponseData = Keyboard.History(Keyboard.History.Count - 1)
>>>> if theResponseData = "5" then
if doAdd = false then
lookStart = theResponseData.RTTime
lookAwayTime = 0
Display.Canvas.text 0, 0, "5 pressed " & theResponseData.RTTime
doADD = true
end if
if theResponseData = "{-5}" then
if doAdd = true then
lookAwayStart= theResponseData.RTTime
lookTime = theResponseData.RTTime-lookStart
habitArray(trialCount).AddObservation lookTime
Display.Canvas.text 0, 0, "5 Released " & theResponseData.RTTime
Display.Canvas.text 500, 0, "looking time: " & habitArray
(trialCount).total
doAdd = false
end if
end select
loop
I keep getting an "operator mismatch error" on the line pointed out
with >>>>
Also, am I making this more complicated than it needs to be?
Thanks
Chris
--~--~---------~--~----~------------~-------~--~----~
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