Switching between 2 lists and conditionally skipping trials

Paul Groot pfc.groot at gmail.com
Sun Feb 3 21:46:11 UTC 2013


hi,

To start with, the MagicNumber variable needs to be a regular global
variable that is declared in the global User Script section:

Dim MagicNumber as Integer

You implement such a variable as a eprime attribute because its value
depend on the running context.

Eprime will automatically set the variable to 0 when it is declared, so you
might have to initialise it at the start of the experiment (using an inline
script object):

MagicNumber = 1

Then, instead of trying to increment the attribute value (which was
implemented incorrectly, BTW), you can increment the global variable like
this:

MagicNumber = MagicNumber + 1

And finally:

If CInt(c.GetAttrib("Sentencenumber")) < Magicnumber then

                Goto Skip

End if

Without quotes around the variable!

That's it.

best
Paul

On 2 February 2013 00:38, Tronix <claire.zedelius at gmail.com> wrote:

> Hi!
>
>
>
> I’m running into some problems programming an experiment switching
> randomly between 2 lists. I want to present a text, displayed sentence by
> sentence, that contains abnormalities in some, randomly selected sentences.
> For this, I created a program that switches randomly between two nested
> lists. One list contains regular sentences (e.g., “The tree grew.”), the
> other slightly modified versions of the same sentences (e.g., “The tree
> gfrwr.”). Now I don’t want to show any sentence in both the regular and
> abnormal version. To achieve this, I numbered the sentences and basically
> tried to tell e-prime to skip a sentence if a sentence with the same number
> from the other list has already been presented. When I run the program,
> however, it seems to skip all the sentences. I can’t seem to find the
> mistake. I’d be very happy if somebody here could help me with this.
>
>
>
> Here is what I did:
>
>
>
> 1. I created a variable (“Magicnumber “) that’s supposed to keep count of
> the presented trials. In the beginning of the script, I set the value to 1:
>
> c.SetAttrib "Magicnumber", 1
>
>
>
> 2. To update this value, immediately after the sentence display object I
> put an inline object saying:
>
> c.SetAttrib "Magicnumber" , "Magicnumber" + 1
>
>
>
> 3. In each of the nested lists containing the sentences, I created a
> variable (“Sentencenumber”) containing the numbers 1 to 30 (from first to
> last sentence).
>
>
>
> 4. I inserted a label object (“Skip”) a bit after the sentence display
> object.
>
>
>
> 5. In order to skip sentences with sentence numbers already selected from
> the other list, immediately before the sentence display object I inserted
> an inline object saying:
>
> If c.GetAttrib("Sentencenumber") < "Magicnumber" then
>
>                 Goto Skip
>
> End if
>
>
>
> Does anybody see what I did wrong here?
>
> Thanks in advance for your help!
>
> --
> You received this message because you are subscribed to the Google Groups
> "E-Prime" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to e-prime+unsubscribe at googlegroups.com.
> To post to this group, send email to e-prime at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/e-prime/-/DPX85uELb2gJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130203/98ed620c/attachment.htm>


More information about the Eprime mailing list