Specify key press before proceding to the next trial
Deiniol Skillicorn
deinskilli at gmail.com
Thu Oct 3 16:01:34 UTC 2013
Hello fellow eprimers,
I have a task where participants are presented with cues and they must rate
them on a 1-9 scale. They then get feedback.
I want participants to enter a digit and then move onto the next slide by
pressing another button. Also, I only want them to be able to move on if
they have entered a digit from 1 to 9.
I am using the echoclient (on the Stage1word slide) so that participants
can see the digit they are entering. I have read around and the mouse seems
to be a good method to move onto the next slide. I have set up a text box
at the bottom of the stage1word slide to act as a button and called the
text box "result"
Participants are able to enter a digit and proceed to the next trials
unsing the mouse. However, they can also proceed to the next trial by NOT
entering a reponse or by entering a response outside the specified range
(i.e. 1-9).
Here is the inline code I am using. I think I need to specifiy an
if..then rule for numebrs thta have been logged but I have no idea how.
Any suggestions would be appreciated
Deiniol
'Designate "theState" as the Default Slide State, which is the
'current, ActiveState on the Slide object "Stimulus"
Dim theState as SlideState
Set theState = Stage1Word.States("Default")
Dim strHit As String
Dim theMouseResponseData As MouseResponseData
Dim nResponseCount As Long
Do While Stage1Word.InputMasks.IsPending()
'If the counts do not match, there are responses to process.
If nResponseCount <> Stage1Word.InputMasks(2).Responses.Count Then
nResponseCount = nResponseCount + 1
'Get the mouse response
Set theMouseResponseData =
CMouseResponseData(Stage1Word.InputMasks(2).Responses(nResponseCount))
'Determine string name of SlideImage or SlideText object at
'mouse click coordinates. Assign that value to strHit
strHit = theState.HitTest(theMouseResponseData.CursorX,
theMouseResponseData.CursorY)
'Compare string name where mouse click occurred to CorrectAnswer
'attribute on each trial, and score response
'NOTE: This comparison is case sensitive
If strHit = "Result" Then
'Goto label2
Stage1Word.InputMasks(1).Timeout
Stage1Word.InputMasks(2).Timeout
End If
End If
'Give some time back (required)
Sleep 10
DoEvents
Loop
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/04212348-6dac-4e50-b890-6f60a0301a53%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20131003/77808605/attachment.htm>
More information about the Eprime
mailing list