Moving box in slide slate according to 8 different conditions

30 views
Skip to first unread message

Edda Foo

unread,
Sep 21, 2022, 12:19:01 PM9/21/22
to E-Prime
Hi everyone, 

I'm new to E-Prime (started since the beginning of the month) and I have been reading guidebooks and watching video tutorials. However, I am still struggling to programme this 2 x 2 x 2 experiment. 

1. Participants are presented a box and can press either UPARROW or DOWNARROW
2. On half of the trials, the box will move in the same direction as their key press (i.e. press UPARROW then box moves up) 100ms/900ms delay after the key press while the other half will move in the opposite direction (i.e press UPARROW then box moves down) 100ms/900ms delay after the key press. 
3. After the box moves, a word will appear. Half of the word list has this particular property while the other half has another property. 

Currently, I am able to make the box move by having separate slide objects for each part of the movement (kind of like a frame-by-frame cartoon type animation) and the 'Wait' object in the Proc allows me to manipulate the delay. However, I would like to know if it is possible to do all of the above within 1 slide object (perhaps with 2 slide slates 1 for one word property, one for the other?). 

Thank you so so much for any suggestions/advice. 

David McFarlane

unread,
Sep 22, 2022, 5:13:58 PM9/22/22
to e-p...@googlegroups.com
Using InLine code, you can do a lot of things to manipulate Slides, not
sure if that is what you want.

If you do want to use InLine code, then you could manage the state of a
Slide simply, e.g.,

Slide1.ActiveState = "State1"
Slide1.Draw

You could set up your Slide with multiple placeholding sub-objects, and
then use InLine code to manage the content of these placeholders, such
as ...

Dim slText as SlideText
Set slText = CSlideText(Slide1.States("Default").Objects("Text1))
slText.Text = "new text"
slText.Draw

You could also directly manipulate Slide sub-objects in other ways,
e.g., ...

' Place SlideText object to center of display
Dim slText as SlideText
Set slText = CSlideText(Slide1.States("Default").Objects("Text1))
slText.X = "50%"
slText.Y = "50%"
slText.Draw

Look at the E-Basic Help facility for more info on some of these items.

Instead of redrawing objects directly in the InLine code, you could set
attributes and then have those attributes take effect the next time the
stimulus object runs (make sure you set Generate PreRun to "Before
Object Run"!), e.g.,

c.SetAttrib TextForBox, "new text"
c.SetAttrib XPosition, "50%"
c.SetAttrib YPosition, "50%"

I generally prefer manipulating stimulus properties through attributes
rather than directly.

Again, don't know if this approaches what you want. With more specific
details it might be possible to think of ways to do what you want
without resorting to InLine code.

-- David McFarlane
Reply all
Reply to author
Forward
0 new messages