Jump to content

Adding commnds after a repeat command


jca001

Recommended Posts

I was changing a program today that had several duplicate steps that I determined could be shortened by using a repeat command. But then when I tried to add another command below the repeat group, I can not, it adds the command to the repeat group. Which is not what I want, because I do not want it repeated.

 

EXAMPLE: (This is pseudo code because I am at work, but I think you will get the idea)

 

repeat 2 times 
    Turn on light 25%
    Wait 5 seconds
    Turn on light 50%
    Wait 5 seconds
    Turn on light 75%
    Wait 5 seconds
    Turn on light 100%
    Wait 5 seconds
    Turn light off
send notification

 

Each time I try to add the send notification, it gets included in the repeat command group. I really want to repeat some commands, then do a couple of commands that are not repeated and then do some more commands that are repeated.

Link to comment

Hello Jack,

 

Use another Repeat command to end the loop:

 

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Repeat 5 times
          Set Scene 'FR Lamp' Fade Up
          Wait  1 second
          Set Scene 'FR Lamp' Fade Stop
          Wait  1 second
       Repeat 1 times
          Wait  5 seconds
          Set Scene 'FR Lamp' Off

Else
  - No Actions - (To add one, press 'Action')


 

Rand

Link to comment

Thanks for the suggestion.

 

I thought about that on my drive to work and was going to try it when I got home later tonight.

 

It would be nice to have either a paren option like there is in the IF or a repeatend command.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...