Hi everyone, <div><br></div><div>I managed to find a solution to my problem, having rummaged through several of the posts here. I am still facing some problems however. My modified code is as below:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">   </span>Do </div><div><span class="Apple-tab-span" style="white-space:pre">                             </span>If (Mouse.Buttons And ebMouseButton1) Then</div><div><span class="Apple-tab-span" style="white-space:pre">                                   </span>Mouse.GetCursorPos x, y</div><div><span class="Apple-tab-span" style="white-space:pre">                                      </span></div><div>             <span class="Apple-tab-span" style="white-space:pre">             </span>strHit2 = theFeedbackState.HitTest(x,y)</div><div><span class="Apple-tab-span" style="white-space:pre">                                      </span>'strHit2 = "checkagain"</div><div><span class="Apple-tab-span" style="white-space:pre">                                    </span>'Debug.print "Point" & theFeedbackState.HitTest(x,y)</div><div><span class="Apple-tab-span" style="white-space:pre">                                   </span>ptCurrentfb.x = x</div><div><span class="Apple-tab-span" style="white-space:pre">                                    </span>ptCurrentfb.y = y</div><div><span class="Apple-tab-span" style="white-space:pre">                                            </span>if PointInRect(ptCurrentfb, FeedbackDest) then </div><div><span class="Apple-tab-span" style="white-space:pre">                                                 </span>strHit2 = "correct"</div><div><span class="Apple-tab-span" style="white-space:pre">                                                        </span>'theSoundOut.Stop</div><div><span class="Apple-tab-span" style="white-space:pre">                                                    </span>'exit do</div><div><span class="Apple-tab-span" style="white-space:pre">                                                     </span>'cnvs.clear</div><div><span class="Apple-tab-span" style="white-space:pre">                                                  </span>Debug.print "Correct"</div><div><span class="Apple-tab-span" style="white-space:pre">                                              </span>else</div><div><span class="Apple-tab-span" style="white-space:pre">                                                 </span>Debug.print "Checking again"</div><div><span class="Apple-tab-span" style="white-space:pre">                                                       </span>strHit2 = "checkagain"</div><div><span class="Apple-tab-span" style="white-space:pre">                                             </span>end if</div><div>  </div><div><span class="Apple-tab-span" style="white-space:pre">                                    </span>'Debug.print "strHit2aft" & strHit2</div><div><span class="Apple-tab-span" style="white-space:pre">                            </span>End If</div><div><span class="Apple-tab-span" style="white-space:pre">                       </span>Loop until strHit2 = "correct"</div><div><br></div><div>This code works (lets call it the intermediate stage)  - in the sense that if the participant were to click on any other area (apart from the designated area) nothing happens. I am however having trouble with resetting the ebMouseButton1 for the trials (say" stage 3) that follow. What happens is - in stage 3, if one were to click on the specific designated area (even though the canvas corresponding to this region was cleared at the end of the intermediate stage) - it simply moves onto the next trial (say stage 4) without going to the intermeditate stage again.</div><div><br></div><div>Thus, the actual flow of the task is: Stage 2 - Intermediate stage (problem here!) - stage 3 - intermediate stage - stage 4 - ....so on..</div><div><br></div><div>On using debug.print, I find that the ebMouseButton1 button is never reset, and so based on a previous correct click, this stage becomes "automatic" and immediately moves to stage 3. That is, to the end user, the first time there is Stage 2 - Intermediate stage (problem here!) - stage 3 - stage 4. </div><div><br></div><div>Please let me know if there is anything that can be done to rectify this. I have tried to explain as clearly as I can, but if anything needs more clarification please let me know.</div><div><br></div><div>I would genuinely appreciate any help.</div><div><br></div><div>Thanks a ton,</div><div>Corona</div><br>On Monday, September 24, 2012 3:34:08 PM UTC-4, Corona wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div>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. </div><div><br></div><div>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). </div><div><br></div><div><br></div><div><div>If confirmation_flag = 1 then</div><div><span style="white-space:pre">            </span></div><div><span style="white-space:pre">      </span>If Not theSoundOut Is Nothing Then</div><div><span style="white-space:pre">    </span>theSoundOut.Play</div><div><span style="white-space:pre">      </span>'Manipulate the SlideSoundOut properties and methods</div><div><span style="white-space:pre">  </span>'Debug.Print theSoundOut.Filename</div><div><span style="white-space:pre">     </span>nResponseCount2 = 0</div></div><div><span style="white-space:pre">               </span>Do </div><div><span style="white-space:pre">                      </span>If mouseMask2.Responses.Count > nResponseCount2 then</div><div><span style="white-space:pre">                               </span> </div><div><span style="white-space:pre">                                </span>nResponseCount2 = nResponseCount2 + 1</div><div><span style="white-space:pre">                         </span>Set theMouseResponseData2 = CMouseResponseData(mouseMask2.<wbr>Responses(nResponseCount2))<span style="white-space:pre">             </span> <span style="white-space:pre">            </span>  <span style="white-space:pre">              </span> <span style="white-space:pre">    </span></div><div><span style="white-space:pre">                      </span>    strHit2 = theFeedbackState.HitTest(<wbr>theMouseResponseData2.CursorX,<wbr>theMouseResponseData2.CursorY)<span style="white-space:pre">                          </span></div><div><span style="white-space:pre">                              </span>ptCurrentfb.x = theMouseResponseData2.CursorX</div><div><span style="white-space:pre">                         </span>ptCurrentfb.y = theMouseResponseData2.CursorY<span style="white-space:pre">                                        </span></div><div>  <span style="white-space:pre">                               </span>if PointInRect(ptCurrentfb, FeedbackDest) then </div><div><span style="white-space:pre">                          </span>strHit2 = "Correct"</div><div><span style="white-space:pre">                         </span>'exit Do</div><div><span style="white-space:pre">                              </span>else</div><div><span style="white-space:pre">                          </span>strHit2 = "checkagain"</div><div><span style="white-space:pre">                              </span>end if</div><div><span style="white-space:pre">                        </span>End if</div><div><span style="white-space:pre">                        </span>Debug.print "strHit2" & strHit2</div><div><span style="white-space:pre">         </span>Loop until strHit2 = "Correct"</div><div><div>  If Not theSoundOut Is Nothing Then</div><div><span style="white-space:pre">           </span>theSoundOut.Stop</div><div><span style="white-space:pre">              </span>Set theSoundOut = Nothing</div><div>    <span style="white-space:pre">       </span>End if<span style="white-space:pre">       </span></div><div><span style="white-space:pre">      </span>End if</div><div><br></div><div>End if</div></div><div><br></div><div>Please let me know where I am going wrong.</div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/e-prime/-/iyozVNN3b80J">https://groups.google.com/d/msg/e-prime/-/iyozVNN3b80J</a>.<br />
For more options, visit <a href="https://groups.google.com/groups/opt_out">https://groups.google.com/groups/opt_out</a>.<br />
 <br />
 <br />