<div><p class="MsoNormal"></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">hi Paul,<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">Thank you for the
reply.  I did have HitTest inline script in my experiment already to detect the
mouse click responses on my stimulus slide.  However, I was able to
successfully incorporate your script into my experiment, and it
worked!  Thank you so much for your help, it is extremely appreciated! 
Hopefully it will be a help to others as well.  Thanks again!</span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black"><br></span></p>

<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">Erin<o:p></o:p></span></p><p></p></div><div><br></div><div><br></div><br><br>On Saturday, August 25, 2012 4:35:54 AM UTC-4, Paul Groot wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div>Hi Erin</div><div> </div><div>I think you missed one important ingredient: the HitTest method. This function is required to determine which object was selected. It will return the name of the object. The GetCursorPos function is also required to get the current cursor coordinates because the HitTest function requires a screen coordinate. The Stimulus slide should contain a mouse input mask and have a duration of infinite because you would like to catch a single mouse click. The InputMask Correct attribute is of no use because you will have to check the accuracy explicitly.</div>
<div> </div><div>Here is a small example script that could work. This inline script assumes you also added a list attribute with the name CorrectImage. It contains values L or R to indicate correct left or right selection. These L/R values should be identical to the names of the SlideImage objects! </div>
<div> </div><div><font face="courier new,monospace">Dim ptMouse As Point<br>Dim strHit As String<br>Dim strCorrectImage As String</font></div><div><font face="courier new,monospace"></font> </div><div><font face="courier new,monospace">Dim theState as SlideState</font></div>
<div><font face="courier new,monospace">Set theState = Stimulus.States (Stimulus.ActiveState)</font></div><div><font face="Courier New"></font> </div><font face="courier new,monospace"><div>'get current mouse coordinate<br>
Mouse.GetCursorPos ptMouse.x, ptMouse.y</div><div><br>'and check which object was selected (if any)<br>strHit = theState.HitTest(ptMouse.x, ptMouse.y)</div><div><br>'get the correct selection from the trial list</div>
<div>'This attribute should contain 'L' or 'R' in this example<br>strCorrectImage = c.GetAttrib("CorrectImage")</div><div><br>'compare both strings ignoring case</div><div>'ACC is not set automatically, so must do this explicitly<br>
If strcomp(strHit,<wbr>strCorrectImage,1)=0 Then<br>   Stimulus.ACC = 1</div><div>   Select Case UCase(strCorrectImage)<br>   Case "L"</div><div>      ImageFeedback.ActiveState = "LeftCorrect"</div><div>   Case "R"</div>
<div>      ImageFeedback.ActiveState = "RightCorrect"</div><div>   Case Else</div><div>      Debug.Assert False</div><div>   End Select<br><br>Else<br>   Stimulus.ACC = 0 <br>   ImageFeedback.ActiveState = "Incorrect" </div>
<div>End If<br></div><div> </div><div><div><font face="arial,helvetica,sans-serif">You also might add the following lines before and after the Stimulus slide to show and hide the cursor:</font></div><div><font face="courier new,monospace"><br>
Mouse.ShowCursor True</font></div><div><font face="courier new,monospace">Mouse.ShowCursor False</font></div></div></font><div> </div><div>Hope I didn't make any mistakes in the example because I didn't have the opportunity to test it myself.</div>
<div><br>Cheers</div><div>Paul</div><div> </div><div><br> </div><div class="gmail_quote">2012/8/24 Erin <span dir="ltr"><<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WDT1HV0T_TQJ">erin.s...@gmail.com</a>></span><br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div>Hello everyone,</div>
<div>I have a simple experiment that displays two images on the screen.  The two SlideImages are named "LeftImage" and "RightImage," and are diplayed on a Slide named "Stimulus."  On each trial, one image is correct, and one is incorrect; responses are made with a mouse click on an image.  </div>

<div> </div>
<div>After a response is made, I want to advance to the Slide "ImageFeedback," displaying one of three SlideStates "LeftCorrect," "RightCorrect," or "Incorrect," depending on the response.</div>

<div> </div>
<div>I am tring to figure out what the appropriate inline script would be to accomplish this.  I am thinking something similar to the following may work, but I know this isn't quite right:</div>
<div> </div>
<div><font face="Courier New"><font face="Courier New">
<p>If strHit = c.GetAttrib("LeftImage") and Stimulus.ACC=1, Then<br>Set ImageFeedback.ActiveState = "LeftCorrect" </p>
<p>Else</p>
<p>If strHit = c.GetAttrib("RightImage") and Stimulus.ACC=1, Then<br>Set ImageFeedback.ActiveState = "RightCorrect"</p>
<p>Else</p>
<p>If Stimulus.ACC=0,<br>Set ImageFeedback.ActiveState = "Incorrect"</p>
<p>End If</p>
<p> </p>
<p><font face="arial,sans-serif">I looked at the example programs "Response Areas For Mouse Input" and "LoadImageUpunMouseClick."  I also searched though the Google Group, and found some similar posts, but was unable to come up with an inline script solution that worked.  Any help would be very appreciated.  I will post the solution that I get to work.  Thanks so much!</font></p>
<span><font color="#888888">
<p> </p>
<p><font face="arial,sans-serif">Erin</font></p></font></span></font></font><span><font color="#888888"><font face="Courier New"><font face="Courier New">
<p> </p></font></font></font></span></div><span><font color="#888888">

<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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WDT1HV0T_TQJ">e-p...@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WDT1HV0T_TQJ">e-prime+u...@<wbr>googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/e-prime/-/xIDmOlnPo4YJ" target="_blank">https://groups.google.com/d/<wbr>msg/e-prime/-/xIDmOlnPo4YJ</a>.<br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/<wbr>groups/opt_out</a>.<br>
 <br>
 <br>
</font></span></blockquote></div><br>
</blockquote>

<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/-/WHrmA5Jxn1IJ">https://groups.google.com/d/msg/e-prime/-/WHrmA5Jxn1IJ</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 />