<div dir="ltr">Dear
<span style="font-family:arial,sans-serif;font-size:14px;font-weight:bold;text-align:left;white-space:nowrap">David McFarlane,</span><div><span style="font-family:arial,sans-serif;font-size:14px;font-weight:bold;text-align:left;white-space:nowrap"> I have tried your suggestion, it really works and it's quite simple compared with what I performed before as : BSlide.Duration=2500-ASlide.RT, and one more question, why you use </span><span style="font-family:arial,sans-serif;font-size:14px">2500 - (Clock.Read - ASlide.OnsetTime).</span></div>
<div><span style="font-family:arial,sans-serif;font-size:14px">Thanks a lot.</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/22 David McFarlane <span dir="ltr"><<a href="mailto:mcfarla9@msu.edu" target="_blank">mcfarla9@msu.edu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Just for the record, I need to correct a bit of my advice here. Earlier, I said that using<br>
<br>
SetNextTargetOnsetTime ASlide.OnsetTime<br>
<br>
between ASlide and BSlide would make the total duration from the start of ASlide to the end of BSlide equal the specified Duration of BSlide (in this case, 2500 ms). But I neglected to say that, for this to work, you must also set BSlide to use Cumulative timing mode. This works because, in Cumulative timing mode, the TargetOnset time for whatever follows BSlide will be based on the TargetOnsetTime of BSlide (instead of actual OnsetTime), and BSlide.TargetOnsetTime will come from the NextTargetOnsetTime implied in the code above. I generally like this approach because it eliminates any errors due to delays in starting BSlide.<br>
<br>
Furthermore, the line of code above makes the total duration of ASlide + BSlide act like Event timing mode (think it through). If you want that to instead act like Cumulative timing mode, then that line should read<br>
<br>
SetNextTargetOnsetTime ASlide.TargetOnsetTime<br>
<br>
i.e., use .TargetOnsetTime instead of just .OnsetTime.<br>
<br>
<br>
If you stubbornly insist on keeping BSlide set to Event timing mode, then the TargetOnset time for whatever follows BSlide will be based on the actual OnsetTime of BSlide, and you have no recourse but to manipulate the Duration of BSlide. In that case, your inline code between ASlide and BSlide should look more like<br>
<br>
BSlide.Duration = 2500 - (Clock.Read - ASlide.OnsetTime)<br>
<br>
or if you prefer,<br>
<br>
c.SetAttrib "BSlideDuration", 2500 - (Clock.Read - ASlide.OnsetTime)<br>
<br>
and then use "[BSlideDuration]" as an attribute reference for the Duration of BSlide (see comments on assigning object properties directly in code vs. via attribute reference at <a href="https://groups.google.com/d/topic/e-prime/dWpfjk-BeLs" target="_blank">https://groups.google.com/d/<u></u>topic/e-prime/dWpfjk-BeLs</a> and <a href="https://groups.google.com/d/topic/e-prime/g1Fv2CGaSeg" target="_blank">https://groups.google.com/d/<u></u>topic/e-prime/g1Fv2CGaSeg</a> ).<br>
<br>
Manipulating Duration (instead of NextTargetOnsetTime) also means that the actual duration of BSlide (and ASlide + BSlide) will vary depending on any delays in starting BSlide, but maybe that is what you want.<div class="im">
<br>
<br>
-----<br>
David McFarlane<br>
E-Prime training online: <a href="http://psychology.msu.edu/Workshops_Courses/eprime.aspx" target="_blank">http://psychology.msu.edu/<u></u>Workshops_Courses/eprime.aspx</a><br>
Twitter: @EPrimeMaster (<a href="https://twitter.com/EPrimeMaster" target="_blank">https://twitter.com/<u></u>EPrimeMaster</a> )<br>
<br>
/----<br>
Stock reminder: 1) I do not work for PST. 2) PST's trained staff take any and all questions at <a href="https://support.pstnet.com" target="_blank">https://support.pstnet.com</a> , and they strive to respond to all requests in 24-48 hours, so make full use of it. 3) In addition, PST offers several instructional videos on their YouTube channel (<a href="http://www.youtube.com/user/PSTNET" target="_blank">http://www.youtube.com/user/<u></u>PSTNET</a> ). 4) If you do get an answer from PST staff, please extend the courtesy of posting their reply back here for the sake of others.<br>
\----<br>
<br>
<br></div><div><div class="h5">
At 10/14/2013 02:22 PM Monday, David McFarlane wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Not sure I follow your description of the problem. But let's suppose you have two Slides in your Procedure, let's call them ASlide and BSlide. ASlide takes a response, and the Procedure moves on to present BSlide whenever ASlide gets a response, or 2000 ms, whichever comes first. And you want the total duration for ASlide & BSlide to be 2500 ms, i.e., BSlide should last for 2500 - (ASlide_actual_duration).<br>
<br>
There are many ways to skin this cat. My favorite method goes as follows. Set the Duration of BSlide to 2500, and in an Inline between ASlide and BSlide, do the following:<br>
<br>
SetNextTargetOnsetTime ASlide.OnsetTime<br>
<br>
That's all! Understanding how this works takes some deeper understanding of E-Prime timing models & mechanisms, more than I can go into here, but look at the SetNextTargetOnsetTime topic in the E-Basic Help facility. But in short, with that bit of code, BSlide will use the actual OnsetTime from ASlide in order to compute its own ending time, and so will end at 2500 ms from the OnsetTime of ASlide, whithout you having to do anything more. Presto!<br>
<br>
-----<br>
David McFarlane<br>
E-Prime training online: <a href="http://psychology.msu.edu/Workshops_Courses/eprime.aspx" target="_blank">http://psychology.msu.edu/<u></u>Workshops_Courses/eprime.aspx</a><br>
Twitter: @EPrimeMaster (<a href="https://twitter.com/EPrimeMaster" target="_blank">https://twitter.com/<u></u>EPrimeMaster</a> )<br>
<br>
/----<br>
Stock reminder: 1) I do not work for PST. 2) PST's trained staff take any and all questions at <a href="https://support.pstnet.com" target="_blank">https://support.pstnet.com</a> , and they strive to respond to all requests in 24-48 hours, so make full use of it. 3) In addition, PST offers several instructional videos on their YouTube channel (<a href="http://www.youtube.com/user/PSTNET" target="_blank">http://www.youtube.com/user/<u></u>PSTNET</a> ). 4) If you do get an answer from PST staff, please extend the courtesy of posting their reply back here for the sake of others.<br>
\----<br>
<br>
<br>
At 10/8/2013 10:00 PM Tuesday, Kim Goodyear wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to have two sequential slides that are equal to one time duration of 2500 ms. The first slide and the second slide are completely identical, except in the second slide the text color changes to red so that the participant can see their selection, I want the first slide to terminate and then have the second slide come up so that they both equal the same 2500 ms. Since the response time will vary I don't know how to make both slides equal to the same 2500. I don't know why, but if the buttons aren't selected right away, the total duration is around 5000, or if there is a delay in the response, the total duration is around 4200. I am not sure how to fix this issue, any advice would be great. Here is my inline script:<br>
<br>
Dim ResetSlide as integer<br>
Dim x as integer<br>
<br>
ResetSlide = StimDisplay.Duration + StimDisplay2.Duration<br>
ResetSlide = x<br>
x = 2500<br>
</blockquote></blockquote>
<br>
-- <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%2Bunsubscribe@googlegroups.com" target="_blank">e-prime+unsubscribe@<u></u>googlegroups.com</a>.<br>
To post to this group, send email to <a href="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a>.<br></div></div>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/e-prime/526573bf.0286320a.39d7.2574SMTPIN_ADDED_MISSING%40gmr-mx.google.com" target="_blank">https://groups.google.com/d/<u></u>msgid/e-prime/526573bf.<u></u>0286320a.39d7.2574SMTPIN_<u></u>ADDED_MISSING%40gmr-mx.google.<u></u>com</a>.<div class="HOEnZb">
<div class="h5"><br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/<u></u>groups/opt_out</a>.<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 unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe@googlegroups.com.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/e-prime/CAJO0WNaUW4uf8keCXTtJd375UCg9SpSpntHKDXuEPiWwsUUoZQ%40mail.gmail.com">https://groups.google.com/d/msgid/e-prime/CAJO0WNaUW4uf8keCXTtJd375UCg9SpSpntHKDXuEPiWwsUUoZQ%40mail.gmail.com</a>.<br />
For more options, visit <a href="https://groups.google.com/groups/opt_out">https://groups.google.com/groups/opt_out</a>.<br />