Else command
You can use an Else command to create alternate programming to an If conditional. This example will program a button to open the blinds if it's day time and close the blinds if it's night time.
To program the blinds with an Else command:
- Start Composer Pro and connect to a Director.
- Click Programming.
- In the Device Events pane project tree, select the keypad.
- In the keypad Events pane, select the button that you want to program—Blinds This automatically identifies the Press event for programming the button on the keypad. The event appears at the top of the Script pane.
- In Device Actions, select Scheduler and click on Conditionals.
- Click Time and click Day time.
- Drag the blue question 'If time is day time' conditional to the Script pane.
- Select the Master Blinds in Device Actions, click on Open, and drag the 'Set the blind target level on <room>->Master Blinds to Open' command to nest it below the conditional.
- In Programming Controls, click on Else and drag the Else icon on top of the conditional in the Script pane. The mouse icon changes to indicate you can place the Else command below the If command (and link them logically).
- Select the Master Blinds in Device Actions, click on Close, and drag the 'Set the blind target level on <room>->Master Blinds to Close' command to nest it below the Else conditional.
See “Programming with a While statement” or “Programming with conditionals” for details.