For If condition practice first create new window configured as following
All the lights as Light1 , Light2 , Light3 , Light4
Slider as slider
Right Click on window and go to “Window Script” and set ccondition type to “while showing” and every “100”.
type following code to the window.
IF slider<=30 THEN Light1 = 1;
ELSE Light1 = 0;
IF slider>30 AND slider<60 THEN Light2=1;
ELSE Light2 = 0;
IF slider>60 AND slider<80 THEN Light3=1;
ELSE Light3 = 0;
IF slider>80 AND slider<=100 THEN Light4=1;
ELSE Light4 = 0;
Take care of semicolon
click on Runtime on top Right window to Run the Program.
Output window screenshots