This article applies to:
This sample illustrates how to enable a SlideButton based on the responses of a SlideChoice / SlideSlider.
E-Prime 3.0 introduced SlideButtons, SlideChoices, and SlideSliders. Occasionally when presenting a SlideButton, researchers may not want to enable the Button instantly. The researcher may want the state of the SlideButton to change depending on how a participant responds to a SlideChoice or SlideSlider. The two attached experiments demonstrate how to enable a SlideButton based on the responses to the SlideChoice and SlideSlider objects. Both experiments show two different methods for enabling the Button: InLine script and Task Events.
In SlideChoiceEnableButton.es3, the first method of enabling the SlideButton is the InLine method. A Do Loop exists in InLine2 that enables the SlideButton if the SlideChoice's value changes from a blank value to one of the Choice options. The second method (Task Event) works in a similar fashion. However, the main difference is that the sub-routine is set in the User Script, and a Task Event is created on Slide2. The Task Event runs the sub-routine any time the SlideChoice value changes.
In SlideSliderEnableButton.es3, the first method of enabling the SlideButton is the InLine method. Like the SlideChoice experiment, a Do Loop exists in InLine2 that enables the SlideButton. However, the SlideButton is only enabled after the Slider value has been changed. Additionally, the Task Event is structured similarly to the SlideChoice experiment.
NOTE: To disable or enable a SlideButton, the Boolean value of '.enabled' needs set. In both experiments, this is performed in InLine1 and InLine3.
E-STUDIO: SlideButton Sub-Object 
E-STUDIO: SlideChoice Sub-Object 
E-STUDIO: SlideSlider Sub-Object 
Nice example of a useful function. I especially like the second method using Script Task Events.
Please sign in to leave a comment.