<div><p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">Dear Paul,<br>
<br>
please don't get tired of my stupid questions... I have two more.:)</span><span lang="EN-GB" style="font-size:12.0pt;font-family:"Times New Roman","serif""></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><br>
1) I could not make this previous one work, so I decided to go into your
suggestion and ask how can I set up a slide that you have already mentioned. I
had this idea on my mind when I had started to plan the experiment, but I
thought that I will be challenging and hard to make approximately 30 slides.
But now I understood that the analysis of the data will be a pain and even
harder with this design, so I would be grateful if you could explain how can I
switch to the latter solution.<br>
<br>
2) The second and most shamefully easy question would be in connection with
mouse hiding. I want the cursor to be hidden through the part, when the program
just shows the pictures. If it is there the cursor can be distracting in a
visual paradigm like this. However, I really need the mouse to be shown when we
ask for and register mouse response (through the exposition of the grid exercise).
I found this in the help, but I'm a starter (it was a week ago when I first saw
the programme.. ), and I don't know how could I make this work.</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><br><font color="#999999">'This example loops through the available </font></span><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"> cursors.</span></font></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">'EXAMPLE PART A</font></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">Instructions.Text = "Press the spacebar to \n
begin " &_</font></span></p>
<p class="MsoNormal"><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">"the </span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"> cursors
demo..."</span></font></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">'EXAMPLE PART B</font></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">Display.Canvas.Clear</font></span></p>
<p class="MsoNormal"><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">Display.Canvas.Text 0, 0, "Display the available </span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"> cursors..."</span></font></p>
<p class="MsoNormal"><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">Mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">.ShowCursor True</span></font></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">Dim i As Integer</font></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">For i = 1 to 13</font></span></p>
<p class="MsoNormal"><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">Mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">.ShowCursor False</span></font></p>
<p class="MsoNormal"><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">Mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">.Cursor = i</span></font></p>
<p class="MsoNormal"><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">Mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">.SetCursorPos Display.XRes/2, 20</span></font></p>
<p class="MsoNormal"><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">Mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">.ShowCursor True</span></font></p>
<p class="MsoNormal"><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">Display.Canvas.Text 50, 25, "Current </span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"> "
&_</span></font></p>
<p class="MsoNormal"><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">"cursor value = " & </span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">Mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">.Cursor</span></font></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">Sleep 2000</font></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">Next i</font></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">Display.Canvas.Clear</font></span></p>
<p class="MsoNormal"><font color="#999999"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-color:rgb(51,153,255);background-repeat:initial initial">Mouse</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">.ShowCursor False</span></font></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">c.SetAttrib "Stimulus", "End of cursors
demonstration "</font></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">StimDisplay.Run</font></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">'terminate the rest of the experiment</font></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">StimDisplay.Duration = 0 'do not display the normal
StimDisplay</font></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">List1.Terminate 'do not cycle</font></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999">'Note: To run this example with E-BasicExample.es,
copy the script in<br>
'EXAMPLE PART A above and paste it into the Setup InLine object. Next<br>
'copy the script in EXAMPLE PART B above and paste it into the Before<br>
'InLine object.</font></span></p><p class="MsoNormal"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><font color="#999999"><br></font></span></p><p class="MsoNormal"><span style="font-family:Arial,sans-serif;font-size:12pt">Thanks a lot!!!!!!</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">
Eszter</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p><div><br></div><br><div class="gmail_quote">2012/11/16 Paul Groot <span dir="ltr"><<a href="mailto:pfc.groot@gmail.com" target="_blank">pfc.groot@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span lang="EN-GB">Hi again Eszter,<br><br></span>There are several way's to do this, but assuming your bitmap pictures are drawn unstretched in the middle of the screen (and have fixed dimensions), then you could try something like this (be warned, this will be uggly):<br>
<br> Const N_x As Integer = 4 ' number of images hor.<br> Const N_y As Integer = 4 ' number of images vert.<br> Const size_x As Long = 1000 ' width of bitmap in pixels<br> Const size_y As Long = 776 ' height of bitmap in pixels<br>
Dim offset_x As Long<br> Dim offset_y As Long<br> Dim index_x As Integer<br> Dim index_y As Integer<br> Dim delta_x As Long<br> Dim delta_y As Long<br> offset_x = (size_x - Display.XRes)/2<br>
delta_x = size_x / N_x<br> index_x = (theMouseResponseData.CursorX-offset_x)/delta_x<br> offset_y = (size_y - Display.YRes) / 2<br> delta_y = size_y / N_y<br> index_y = (theMouseResponseData.CursorY-offset_y)/delta_y<br>
<br> Dim index As Integer<br> index = (index_y-1)*N_x+index_x<br> debug.print "I=" & index & " (" & index_x & "," & index_y & ")" <br>
<br>You could put this inside the if-then-endif part to get the subimage indices of the selected images (ranging from 1 to 16; counting row-by-row) The next thing to do would be a simple test if the indices match the correct answer. Normally you would but the correct answer as attributes in the trial list. However, because all 8 clicks are handled within a single trial, you would have to specify the correct indices for all 8 clicks as 8 separate attributes (i.e. 'CorrectCLick.1', 'CorrectCLick.2' etc.). <br>
<br> Dim correct_index As Integer<br> correct_index = CInt(c.GetAttrib("CorrectClick." & CStr(iResponse)))<br> c.SetAttrib "ClickACC." & CStr(iResponse), IIf(index = correct_index, 1, 0)<br>
<br>I'm sure there are dozens of bugs in this code, but this is the general idea if your stimulus is a single bitmap image. As said before, this is not a very elegant piece of work. And there still things going wrong here (for example: the black borders are also treated as valid subimage area). A more elegant way would be to use a hidden bitmap that has a color map that mappes the valid subimage areas to a subimage number. Then a simple getpixel-call would return the selected image. (Also works for non-rectangular areas.) Another option would be to use a slide with 4x4 separate slide images. This would also simplify the script because EStudio has a special HitTest function that can be used to test which object was selected.<br>
<br><br>Cheers<span class="HOEnZb"><font color="#888888"><br>Paul</font></span><div class="HOEnZb"><div class="h5"><br><br><br><div class="gmail_quote">2012/11/15 Eszter Kormann <span dir="ltr"><<a href="mailto:ringril@gmail.com" target="_blank">ringril@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p class="MsoNormal"><span lang="EN-GB">Dear Paul,<br>
<br>
thank you for your quick and amazing answer, everything works :)<br>
However, we faced the problem of marking good and bad answers in this case,
because we only get the x and y coordinates for the clicks whereas we need to
compare this with the small pictures coordinates on the screen. <br>
I don't know if I made it clear or not, but we would like to 1) pinpoint the
frames for the small pictures 2) define which (small) picture within the grid
is meant to be a good answer in the trial and 3) then we want the program to
decide whether the click of the responder was correct or not.<br>
We thought that we might use something like an <i>if "mouse coordinate is XY" < x1 <span> </span>> x2 then "YES", otherwise NO. </i><span> </span>Sorry for the form, but unfortunately I still
don’t know this language. </span></p>
<p class="MsoNormal"><span lang="EN-GB">I know it
sounds awfully complicated, but I really need your help.<br>
<br>
Thanks a lot in advance!!!<br>
All the best,<br>
Eszter</span></p>
<br><br><div class="gmail_quote">2012/11/13 Paul Groot <span dir="ltr"><<a href="mailto:pfc.groot@gmail.com" target="_blank">pfc.groot@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Eszter,<br><br>You could change the inline script a bit, but you would first have to set the number of allowed responses of the inputmask to 8 (click the advanced button and edit max count). Then use the following script after the stimulus object:<br>
<br><span style="font-family:courier new,monospace"><font size="1"><span style="color:rgb(102,102,102)">Dim iResponse As Integer<br>For iResponse = 1 To Stimulus.InputMasks.Responses.Count<br> Dim theMouseResponseData As MouseResponseData<br>
Set theMouseResponseData = CMouseResponseData(Stimulus.InputMasks.Responses(iResponse))<br> If Not theMouseResponseData Is Nothing Then<br> c.SetAttrib "Stimulus." & CStr(iResponse) & ".RespCursorX", theMouseResponseData.CursorX<br>
c.SetAttrib "Stimulus." & CStr(iResponse) & ".RespCursorY", theMouseResponseData.CursorY<br> c.SetAttrib "Stimulus." & CStr(iResponse) & ".RT", theMouseResponseData.RT<br>
End If<br>Next</span></font></span><br><br>I also added the response time to the output because you might need that too. (Or just delete that line if you don't) The attached script contains a working example.<br>
<br>
Normally I would prefer a separate list object with 8 'subtrials' to handle the individual mouse clicks. The advantage would be a more more compact edat-output file(because you don't have to generate separate attribute names for sequential responses). Another advantage is that you could implement more sophisticated constructions, like highlighting the selected objects as soon as they are selected or terminating after a specific object was selected. However, the disadvantage is that it is slightly more complex if response time recording should be accurate.<br>
<br>Hope this helps.<br><br>Cheers,<br>Paul<br><br><br><div class="gmail_quote">2012/11/13 Eszter Kormann <span dir="ltr"><<a href="mailto:ringril@gmail.com" target="_blank">ringril@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222;background:white">Hello,</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"><br>
<br>So, once again :)<br>
<span style="background:white">I have a very simple problem in connection with
collecting multiple mouse response coordinates. We use a single picture which
consists of several pictures in a 4X4 grid (I've attached a sample). People are
asked to click on those pictures within the grid which we had already shown to
them (8 clicks out of 16). How can I register all of the 8 clicks's coordinates
with the modification of the script linked below, which in fact works
perfectly well for our experiment. </span></span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;background-repeat:initial initial"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;background-repeat:initial initial"><span style="font-size:8.5pt;font-family:"Verdana","sans-serif";color:#5f779c"><br>
</span><span style="font-size:8.5pt;font-family:"Courier New";color:#5f779c">If
Stimulus.InputMasks.Responses.Count > 0 Then</span><span style="font-size:8.5pt;font-family:"Verdana","sans-serif";color:#5f779c"><br>
<br>
</span><span style="font-size:8.5pt;font-family:"Courier New";color:#5f779c">Dim
theMouseResponseData As MouseResponseData<br>
Set theMouseResponseData = CMouseResponseData(Stimulus.InputMasks.Responses(1))<br>
If theMouseResponseData Is Nothing Then<br>
c.SetAttrib "Stimulus.RespCursorX", theMouseResponseData.CursorX<br>
c.SetAttrib "Stimulus.RespCursorY", theMouseResponseData.CursorY<br>
End If</span><span style="font-size:8.5pt;font-family:"Verdana","sans-serif";color:#5f779c"><br>
<br>
</span><span style="font-size:8.5pt;font-family:"Courier New";color:#5f779c">End If</span><span style="font-size:8.5pt;font-family:"Verdana","sans-serif";color:#5f779c"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;background-repeat:initial initial">
<span style="font-size:8.5pt;font-family:"Courier New";color:#5f779c"><br></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;background-repeat:initial initial"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">Thanks a lot,<br>
Eszter </span></p></div></div><span><font color="#888888">
<p class="MsoNormal"><b> </b></p><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="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href="mailto:e-prime%2Bunsubscribe@googlegroups.com" target="_blank">e-prime+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/groups/opt_out</a>.<br>
<br>
<br>
</font></span></font></span></blockquote></div><span><font color="#888888"><br><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="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href="mailto:e-prime%2Bunsubscribe@googlegroups.com" target="_blank">e-prime+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/groups/opt_out</a>.<br>
<br>
<br>
</font></span></font></span></blockquote></div><span><font color="#888888"><br>
<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="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href="mailto:e-prime%2Bunsubscribe@googlegroups.com" target="_blank">e-prime+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/groups/opt_out</a>.<br>
<br>
<br>
</font></span></blockquote></div><br>
<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="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href="mailto:e-prime%2Bunsubscribe@googlegroups.com" target="_blank">e-prime+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/groups/opt_out</a>.<br>
<br>
<br>
</div></div></blockquote></div><br></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 />
For more options, visit <a href="https://groups.google.com/groups/opt_out">https://groups.google.com/groups/opt_out</a>.<br />
<br />
<br />