<div dir="ltr">Dear Paul,<div><br></div><div>Thank you very much for your answer, it works very well!</div><div><br></div><div>Best,</div><div><br></div><div>Ellie<br><br>Op zaterdag 12 april 2014 01:10:44 UTC+2 schreef Paul Groot:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Oops, something went wrong when hitting the tab and enter key, so let me restart:<div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><span style="font-family:arial,sans-serif;font-size:13px">One way of doing this, is to start with storing the trigger time of the scanner in a global variable. You need to declare this variable in the 'User' tab page of the script window:</span><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">   Dim lTriggerTime as long</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
Then, assign the trigger time to this global variable. Assuming you have an object that waits for the trigger signal (say a Text object called WaitForTrigger), you should add an inline script immediately after this object and enter the following:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">   lTriggerTime = WaitForTrigger.RTTime<br></div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Then, at the end of the trial, add an inline script with the following:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
   if Clock.Read>=lTriggerTime+3*<wbr>60000 then</div></div><div style="font-family:arial,sans-serif;font-size:13px">     TrialList.Terminate</div><div style="font-family:arial,sans-serif;font-size:13px">   end if</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">(Assuming the list is called TrialList.) Make sure to set the TrialList properties to stop after 25 trials.</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">One may argue that it would be easier to put the time limit in the 'Exit List' properties of TrialLIst, and simply keep a trial counter to check for N=25. However, for fMRI analysis it is often very convenient to store all relevant onset and response times as output attributes, which are measured relative to the trigger time. This is easy to do once you have the start time available as global variable. For example, the following script (at the end of the trial) would save the relative onsetttime as StimOnset in the edat file:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">   c.SetAttrib "StimOnset", CStr(Stim.OnsetTime - lTriggerTime)</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Best,</div><div style="font-family:arial,sans-serif;font-size:13px">Paul</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div></div><div>
<br><br><div class="gmail_quote">On 12 April 2014 00:55, Paul Groot <span dir="ltr"><<a href="javascript:" target="_blank" gdf-obfuscated-mailto="eHGbYv-ql6YJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">pfc....@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Hi Ellie,</div><div><br></div>One way of doing this, it to start with storing the trigger time of the scanner in a global variable. You need to declare this variable in the 'User' tab page of the script window:<div>

<br></div><div>Dim lTriggerTime as long</div><div><br></div><div>Then, assign the trigger time. Assuming you have an object that waits for the trigger signal (say a Text object called WaitForTrigger), you should add an inline script immediately after this object and enter the following:</div>

<div><br></div><div>lTriggerTime = WaitForTrigger.RTTime<br></div><div><br></div><div>Then, at the end of the trial, add an inline script with the following:</div><div><br></div><div>if Clock.Read>=lTriggerTime+3*<wbr>60000 then</div>

<div><br></div><div><br></div></div><div><br><br><div class="gmail_quote">On 11 April 2014 11:39, Ellie van Setten <span dir="ltr"><<a href="javascript:" target="_blank" gdf-obfuscated-mailto="eHGbYv-ql6YJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ellieva...@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<div><br></div><div>I am doing an fMRI experiment with children with dyslexia and controls. They have to perform a rhyming task. Because control children are much faster than dyslexic children I would like the response time to be variable (because otherwise it would be extremely boring) The problem is that the scanner needs to synchronize with the E-prime task after a fixed time (the scanner sends a trigger that allows E-prime to go on). My solution would be to limit the time the children can spend on the task to three minutes, then have a small break with a fixation cross and synchronize and then go to the next block. Only for the fast children I would like that they go to the break a bit earlier, after 25 trials. So I want to pick 25 samples from my task list OR I would like to stop the task and go to the break after three minutes. Preferably letting the children finish the trial that was started. I have tried using some in-line codes but this did not work. I hope you have suggestions how I can solve this problem.</div>

<div><br></div><div>Best, </div><span><font color="#888888"><div><br></div><div>Ellie</div></font></span></div><span><font color="#888888"><span><font color="#888888">

<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="javascript:" target="_blank" gdf-obfuscated-mailto="eHGbYv-ql6YJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">e-prime+u...@<wbr>googlegroups.com</a>.<br>
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="eHGbYv-ql6YJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">e-p...@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/e-prime/0935c7d7-a869-401c-a34d-46d8e5ba8a41%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/e-prime/0935c7d7-a869-401c-a34d-46d8e5ba8a41%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/e-prime/0935c7d7-a869-401c-a34d-46d8e5ba8a41%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/<wbr>msgid/e-prime/0935c7d7-a869-<wbr>401c-a34d-46d8e5ba8a41%<wbr>40googlegroups.com</a>.<br>


For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/<wbr>optout</a>.<br>
</font></span></font></span></blockquote></div><br></div>
</blockquote></div><br></div>
</blockquote></div></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/4ade93f2-7dd9-4ec3-a4e8-6148f617a657%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/e-prime/4ade93f2-7dd9-4ec3-a4e8-6148f617a657%40googlegroups.com</a>.<br />
For more options, visit <a href="https://groups.google.com/d/optout">https://groups.google.com/d/optout</a>.<br />