Do..While for mouse click

Corona shunyata.aishwarya at gmail.com
Mon Sep 24 19:34:08 UTC 2012


I am trying to execute the following do..until statements in the context of 
a dot probe task. The loop below basically checks whether the participant 
clicked on a designated area(a cnvs rectangle copied to the destination 
marked as "FeedbackDest"). Assuming the participant does not click on this 
region, no action is taken. One can get out of the loop only by hitting the 
designated spot. There is a music that precedes this statement, and 
basically, when one hits a prompt, a music follows, and the participant is 
directed to this region to click (basically to proceed with a fresh trial). 
Once the participant clicks on this region, the music stops. 

While I get this to work for a participant who answers correctly (i.e. 
clicks on the correct/designated area), when one clicks on a different area 
of the screen - the music continues to play (as it should), but right after 
that, if I were to click on the designated spot - nothing happens (ideally, 
it should proceed to the next set of images). 


If confirmation_flag = 1 then
 If Not theSoundOut Is Nothing Then
theSoundOut.Play
'Manipulate the SlideSoundOut properties and methods
'Debug.Print theSoundOut.Filename
nResponseCount2 = 0
Do 
If mouseMask2.Responses.Count > nResponseCount2 then
 
nResponseCount2 = nResponseCount2 + 1
Set theMouseResponseData2 = 
CMouseResponseData(mouseMask2.Responses(nResponseCount2))     
    strHit2 = 
theFeedbackState.HitTest(theMouseResponseData2.CursorX,theMouseResponseData2.CursorY) 
ptCurrentfb.x = theMouseResponseData2.CursorX
ptCurrentfb.y = theMouseResponseData2.CursorY 
  if PointInRect(ptCurrentfb, FeedbackDest) then 
strHit2 = "Correct"
'exit Do
else
strHit2 = "checkagain"
end if
End if
Debug.print "strHit2" & strHit2
Loop until strHit2 = "Correct"
  If Not theSoundOut Is Nothing Then
theSoundOut.Stop
Set theSoundOut = Nothing
    End if 
End if

End if

Please let me know where I am going wrong.

-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/mLLYtc8IFtwJ.
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/20120924/a1cd7306/attachment.htm>


More information about the Eprime mailing list