<div dir="ltr"><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><font color="#000000">Hello all,</font></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><font color="#000000"><br></font></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><font color="#000000">I’m attempting to record/display mouse movements ONLY when the mouse is clicked, but am having a difficult time figuring out how to go about it. Below is the inline code that I am starting with. Where the “CollectResponse” is the name of the text object that is waiting for a response in a trial.</font></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><font color="#000000"> </font></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><font color="#000000">It would be ideal to not have the mouse click advance this inline code; so right now the only way to get this code to work is by setting the inputs to “CollectResponse” to the keyboard (not the mouse). So it waits for the input to a keyboard input and then it stops recording. This is great…i.e. I want the keyboard to quite the trial… but the problem is that it won’t record the mouse clicks this way. It will only let me record the position regardless of whether mouse is clicked or not. And so I am having difficulty figuring out how to make a conditional statement where it only records/displays the mouse movements IF the “Left” mouse button is pressed.</font></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><font color="#000000"> </font></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><font color="#000000">So, are there any ideas regarding how to record ONLY when the “Left” mouse button is clicked?</font></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><font color="#000000"> </font></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><font color="#000000">I understand that this might be a bit of a novice question, and so at least being pointed in the right direction would be very helpful. I've attached a very basic paradigm with only two trials to illustrate the point where I am at (i.e. right now it records mouse movements whether the mouse key is pressed or not); oh and btw it is eprime professional </font></span><span style="color: rgb(0, 0, 0); font-family: 'Courier New';"> 2.0.10.242.</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><br></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><font color="#000000">Thank you so much for any input!</font><font color="#008000"></font></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;"> 'Inline code that I have been working with</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">'Set filename</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">Dim</span><span style="font-size: 10pt; font-family: 'Courier New';"> strFilename </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">As</span><span style="font-size: 10pt; font-family: 'Courier New';"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">String</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">'Declare pointer variable to hold coordinates</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Dim ptMouse As Point</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">'Declare and initialize a variable that will hold the next target time</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">' to log a coordinate</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Dim nLogTime As Long</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">nLogTime = Clock.Read</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">'Constant holding the size of the circles used</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">' to replay the subject's path</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Const nRadius As Integer = </span><span style="font-size: 10pt; font-family: 'Courier New'; color: purple;">5</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">'Create and initialize Canvas</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Dim cnvsReplay As Canvas</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Set cnvsReplay = Display.Canvas</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">'Constant representing the interval at which coordinates will be tracked</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Const nInterval As Integer = </span><span style="font-size: 10pt; font-family: 'Courier New'; color: purple;">10</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">'Counter variable used to name attributes</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Dim nCount As Long</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">cnvsReplay.PenColor = CColor(</span><span style="font-size: 10pt; font-family: 'Courier New'; color: maroon;">"black"</span><span style="font-size: 10pt; font-family: 'Courier New';">)</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">cnvsReplay.FillColor = CColor(</span><span style="font-size: 10pt; font-family: 'Courier New'; color: maroon;">"black"</span><span style="font-size: 10pt; font-family: 'Courier New';">)</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">cnvsReplay.PenWidth = </span><span style="font-size: 10pt; font-family: 'Courier New'; color: purple;">1</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">'Loop until a response is made</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Do While CollectResponse.InputMasks.<wbr>IsPending()</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">'Check if 25ms have passed</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> If Clock.Read > nLogTime Then</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">'Increment counter</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> nCount = nCount + </span><span style="font-size: 10pt; font-family: 'Courier New'; color: purple;">1</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> Mouse.GetCursorPos ptMouse.x, ptMouse.y</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> cnvsReplay.Circle ptMouse.x, ptMouse.y, nRadius</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> c.SetAttrib </span><span style="font-size: 10pt; font-family: 'Courier New'; color: maroon;">"XYTracked"</span><span style="font-size: 10pt; font-family: 'Courier New';"> & nCount, (nCount & </span><span style="font-size: 10pt; font-family: 'Courier New'; color: maroon;">","</span><span style="font-size: 10pt; font-family: 'Courier New';"> & Clock.Read & </span><span style="font-size: 10pt; font-family: 'Courier New'; color: maroon;">","</span><span style="font-size: 10pt; font-family: 'Courier New';"> & ptMouse.x & </span><span style="font-size: 10pt; font-family: 'Courier New'; color: maroon;">","</span><span style="font-size: 10pt; font-family: 'Courier New';"> & ptmouse.y)</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> Sleep nInterval</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> End If</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Loop</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">Dim</span><span style="font-size: 10pt; font-family: 'Courier New';"> strbmp </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">As</span><span style="font-size: 10pt; font-family: 'Courier New';"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">String</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; font-family: arial, sans-serif; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">strbmp$ = strFilename & </span><span style="font-size: 10pt; font-family: 'Courier New'; color: maroon;">".bmp"</span><span style="font-size: 10pt; font-family: 'Courier New';"></span></p><p class="MsoNormal" style="margin-bottom: 0px; font-family: arial, sans-serif; line-height: normal;"><span style="line-height: 14.266666412353516px; font-size: 10pt; font-family: 'Courier New';">Display.Canvas.SaveImage strbmp</span></p></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:e-prime+unsubscribe@googlegroups.com">e-prime+unsubscribe@googlegroups.com</a>.<br />
To post to this group, send email to <a href="mailto:e-prime@googlegroups.com">e-prime@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/e-prime/b5306857-ffb3-4956-b542-5f4f4af8eda9%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/e-prime/b5306857-ffb3-4956-b542-5f4f4af8eda9%40googlegroups.com</a>.<br />
For more options, visit <a href="https://groups.google.com/d/optout">https://groups.google.com/d/optout</a>.<br />