hit test
c.frosch@reading.ac.uk
die.carrie at gmail.com
Wed Dec 12 14:50:00 UTC 2007
Hi James,
For some reason your suggestion for change didn't come up.
Here is a bit more of the script. I am getting the error message for
the last line of the script I have pasted here, but the reason I am
getting it seems to be because of this bit:
Else
If c.GetAttrib ("CorrectAnswer") = "Box2" and strHit = "Box2" Then
Slide1.ACC = 1
'''''''''''''''''''''''''''''''''''''''''''''
' InLine - InLine4 BEGIN
'''''''''''''''''''''''''''''''''''''''''''''
'Designate "theState" as the Default Slide State, which is the
'current, ActiveState on the Slide object "Stimulus"
Dim theState as SlideState
Set theState = Slide1.States("Default")
'Declare a variable for holding the name of the sub-object
'clicked by the subject.
Dim strHit As String
strHit = ""
'Declare a variable for holding the subject's response data.
Dim theMouseResponseData As MouseResponseData
'Was there a response?
If Slide1.InputMasks.Responses.Count > 0 Then
'Get the mouse response
Set theMouseResponseData =
CMouseResponseData(Slide1.InputMasks.Responses(1))
'Determine string name of SlideImage or SlideText object at
'mouse click coordinates. Assign that value to strHit
strHit = theState.HitTest(theMouseResponseData.CursorX,
theMouseResponseData.CursorY)
End If
'If a particular SlideText was "hit", assign the appropriate image
filename
'to the appropriate attribute.
If c.GetAttrib ("CorrectAnswer") = "Box1" and strHit = "Box1" Then
Slide1.ACC = 1
Else
If c.GetAttrib ("CorrectAnswer") = "Box2" and strHit = "Box2" Then
Slide1.ACC = 1
End If
'''''''''''''''''''''''''''''''''''''''''''''
' InLine - InLine4 END
'''''''''''''''''''''''''''''''''''''''''''''
c.SetAttrib "Slide1.OnsetDelay", Slide1.OnsetDelay
c.SetAttrib "Slide1.OnsetTime", Slide1.OnsetTime
c.SetAttrib "Slide1.DurationError", Slide1.DurationError
c.SetAttrib "Slide1.RTTime", Slide1.RTTime
c.SetAttrib "Slide1.ACC", Slide1.ACC
c.SetAttrib "Slide1.RT", Slide1.RT
c.SetAttrib "Slide1.RESP", Slide1.RESP
c.SetAttrib "Slide1.CRESP", Slide1.CRESP
c.Log
End Sub
On Dec 12, 1:39 pm, "James Keidel" <kei... at gmail.com> wrote:
> hi Caren
>
> hard to tell what the problem is from just that snippet but could you
> possibly change it to:
>
>
>
> > Here is the script that I wrote:
> > If c.GetAttrib ("CorrectAnswer") = strHit Then
> > Slide1.ACC = 1
>
> > End If
--~--~---------~--~----~------------~-------~--~----~
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