Introducing break

David McFarlane mcfarla9 at msu.edu
Tue Sep 29 14:15:48 UTC 2009


liwenna,

Thanks for a nice explanation of this alternative method.  Please 
note that the lines

if trialcounter mod 20 = 0 then
else goto skiplabel
end if

could be simplified to just

If (trialcounter mod 20) <> 0 Then Goto skiplabel

(I also added capitalization and parentheses just to suit my style).

Regards,
-- David McFarlane, Professional Faultfinder


At 9/29/2009 08:37 AM Tuesday, you wrote:

>It sometimes happens however, that your desired number of trials
>inbetween breaks does not correspond with the number of trials in your
>triallist (I took this code for instance from a task with 36 trials in
>one triallist that is repeated 8 times, and I wanted breaks every 20
>trials).
>
>You can do the following:
>
>at the end of the trailproc add three consecutive elements:
>- an inline
>- a slide or textdisplay that is 'the break'
>- a label called skiplabel
>
>The inline should contain the following code:
>---------------------------------------
>           trialcounter = trialcounter + 1
>
>            if trialcounter mod 20 = 0 then
>
>            else goto skiplabel
>            end if
>--------------------------------------
>For this code to work you also need to paste the following " dim
>trialcounter as integer " on the usertab of the scriptwindow (remove
>the " s).
>If you use one single triallist (I don't in this case) you can also
>remove the first line (trialcounter= trialcounter +1) and then replace
>trialcounter mod 20 by triallist.sample mod 20 (triallist being the
>name of your triallist).
>
>What it does: a trialcounter keeps track of the number of trials. If
>the number of trials can be divided by 20 (so: 20, 40, 80, 100 etc)
>then nothing will happen and the program will follow the proc. As the
>inline is followed by the breakslide, the breakslide will show. If the
>number of trials can not be divided by 20, e-prime will immediately
>'goto' the skiplabel and as that is placed after the breakslide, the
>breakslide will be 'skipped'.
>
>
>Best regards,
>
>liwenna
>
>
>
>
>On Sep 28, 10:55 pm, alp115 <asmahani... at gmail.com> wrote:
> > Thanks Adam.
> >
> > On Sep 28, 4:08 pm, Adam Osth <adamo... at gmail.com> wrote:
> >
> > > You can do that really easily without any coding.
> >
> > > Construct a list. Have all of your test trials come up during a given
> > > procedure, like say TrialProc.
> >
> > > Set the TrialProc's weight to 20 for 20 repetitions.
> >
> > > In level 2 of the list, come up with a break procedure called 
> BreakProc (or
> > > whatever you want to call it) that contains the break. If you 
> want to resume
> > > the trials after the break, for level 3 set TrialProc as the procedure.
> >
> > > Adam
> >
> > > On Mon, Sep 28, 2009 at 4:03 PM, alp115 <asmahani... at gmail.com> wrote:
> >
> > > > Dear all,
> >
> > > > I am trying to introduce a break in the list of trials. Say, after 20
> > > > trials, a text display comes introducing a break. After a response
> > > > from the participant, experiment should resume from the same place
> > > > where it left. Does some body has a piece of code to share? Any
> > > > suggestions are well appreciated.
> >
> > >
> > As  ma Hanif
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list