Disable Next Button for Entire Experiment

14 views
Skip to first unread message

SFrueh

unread,
Jul 26, 2021, 1:14:27 PMJul 26
to E-Prime
Hi everybody!

I've been trying to implement a disabled "Next" button for my entire experiment.
I have several different slide objects. On the slide objects I have a SlideChoice object or a SlideSlider Object. Participants have to pick a choice and then click on the "Next" button to move on. Participants shouldn't be able to just click through the experiment. Hence, the "Next" button is disabled until the participant has made a choice.

I managed to disable the button on one slide (e.g. Slide 1) - as described by E-Prime:
Sub ShowButton (c As Context)
If CSlideChoice(Slide1.ActiveObjects("Choice1")).Value <> "" Then
CSlideButton(Slide1.ActiveObjects("Next")).Enabled = True
Else
CSlideButton(Slide1.ActiveObjects("Next")).Enabled = False
End If
End Sub

However, instead of writing a separate subroutine for each slide, I want to write just one subroutine which the slides can access through a task event. I believe one way is to add an additional parameter to the subroutine. However, any way I try it, I always get stuck because of the different names of the slides. For example, if I have 3 slide objects, they all have a different name, e.g. Slide1 / Slide2 / Slide3. The script here refers to the specifc Slide: If CSlideChoice(Slide1.ActiveObjects("Choice1")).Value <> "" Then ... I'm struggling to see how I can avoid that.

Maybe somebody had a similar issue.
Sorry, maybe it's a rather simple problem to fix and I should know how. But I haven't been using E-Prime for that long.

Thanks in advance for any help.
Seraina

Reply all
Reply to author
Forward
0 new messages