Introducing break

1,353 views
Skip to first unread message

alp115

unread,
Sep 28, 2009, 4:03:46 PM9/28/09
to E-Prime
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.

Asma Hanif

Adam Osth

unread,
Sep 28, 2009, 4:08:55 PM9/28/09
to e-p...@googlegroups.com
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

alp115

unread,
Sep 28, 2009, 4:55:41 PM9/28/09
to E-Prime
Thanks Adam.

On Sep 28, 4:08 pm, Adam Osth <adamo...@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
>

liwenna

unread,
Sep 29, 2009, 8:37:27 AM9/29/09
to E-Prime
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

David McFarlane

unread,
Sep 29, 2009, 10:15:48 AM9/29/09
to e-p...@googlegroups.com
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

liwenna

unread,
Sep 30, 2009, 6:25:46 AM9/30/09
to E-Prime
David,

Thanks for the compliment and for the simplified code! I'll put that
line to use right away!

Best,

liwenna

FERNANDO LÚCIO

unread,
Mar 17, 2015, 2:52:41 PM3/17/15
to e-p...@googlegroups.com, adam...@gmail.com
Hi, Adam. I read your message, but did not understand the steps:


"Set the TrialProc's weight to 20 for 20 repetitions."

I´m using an old version of E-Prime (1.0) and maybe it is different from yours, but the object TrialProc here did not show the property "weight". This is shwon when I open the TrialList, so I proceeded as you recommended, using the value "20" in "weight"collumn of TrialList.


"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."

What do you mean with "level 2"? I´m sorry, but I´ve just read the entire Getting Start Guide and I´m reading the User´s Guide, but this issue still seem a little confuse to me...

In sum, I´m trying to implement a simple self paced reading experiment, which must be 4 parts: 1 practice block of 8 sentences shown sequently and 3 consecutive experimental blocks of 32 sentences shown ramdomly. I have 34 experimental items (in a latin square) and 62 fillers (the same in all versions) per version. My goal is to put a single text display in the spaces between blocks. So, the whole procedure should look like it folows:

INSTRUCTIONS » PRACTICE (8 SENTENCES) » BREAKE1 » BLOCK1 (32 ITEMS) » BREAKE2 » BLOCK (32 ITEMS) » BREAKE 3 » BLOCK 3 (32 ITENS) » DEBRIEFING

Could you please help me to implement so?

Rattanasuwan Rawan

unread,
Jul 12, 2017, 12:41:01 AM7/12/17
to E-Prime
Hello Anne,
I have followed your explanation on creating breaks in the experiment. However, when I tried to generate script, the program shows me the error message:
 
Error found during Compile
 sample is not a property of the object

And it shows on the script screen
      '''''''''''''''''''''''''''''''''''''''''''''
' InLine - InLine1 BEGIN <InLine1>
'''''''''''''''''''''''''''''''''''''''''''''
          if TrialListTest.sample mod 20 = 0 then 

           else goto skiplabel 
           end if 
'''''''''''''''''''''''''''''''''''''''''''''
' InLine - InLine1 END
'''''''''''''''''''''''''''''''''''''''''''''

Since you mentioned that if I use a single trial list, I can remove the first line and replace trialcounter mod 20 by triallist.sample mod 20. I did the replacement accordingly (my triallist is named "TrialListTest"), but it still doesn't work. Any suggestion of how I did it wrong?

Max

Anne-Wil

unread,
Aug 3, 2017, 5:33:59 AM8/3/17
to E-Prime
Hi Max,

Sorry, I never noticed this message until now. Hope you have managed to solve things (and I myself am drawing a blank as to what might be going on, while not having access to e-prime myself right now to check what might be up). Except... perhaps... that the inline might be placed on the wrong procedure? It should be on the procedure that the break is supposed to happen (or not happen) in. Also: in the procedure properties the value for 'generateprerun' ought to be adjusted to BeforeObjectRun (rather than topofprocedure which became the default in recent versions of e-prime).

 all best,

Anne
Reply all
Reply to author
Forward
0 new messages