sfhutchi Posted October 8, 2007 Posted October 8, 2007 Before I crash my device... Can I call the same program at the end of a current program to get it to loop? Or is there a way to get it to loop for a period of time? The reason that I ask is because I was thinking about making a program with a lighting sequence for a Halloween Display. I don't need anything as fancy as Light Show Master. Quote
sfhutchi Posted October 8, 2007 Author Posted October 8, 2007 Okay.. Took a chance and did a quick test. It doesn't seem that a program allows you to call itself at the end. Any ideas? Here is what I put, but it only runs once and then stops. If From 6:00:00PM To 11:00:00PM (same day) Then Set 'Hall Light Near Dining' On Wait 3 seconds Set 'Dining Room Chandelier' 40% Wait 2 seconds Set 'Dining Room Recessed Lighting' 60% Wait 5 seconds Set 'Front Hall Light' Off Wait 3 seconds Set 'Dining Room Recessed Lighting' 20% Wait 2 seconds Set 'Dining Room Chandelier' 80% Wait 2 seconds Set 'Hall Light Near Dining' Off Wait 2 seconds Set 'Dining Room Recessed Lighting' Off Wait 2 seconds Set 'Dining Room Chandelier' Off Run program 'Test Program' Else - No Actions - (To add one, press 'Action') Quote
Chris Jahn Posted October 8, 2007 Posted October 8, 2007 I think you looking for the 'Repeat' action. This repeats all actions following it, or up to the next Repeat. You can either repeat a specified number of times, or repeat indefinitely on an interval. Quote
sfhutchi Posted October 8, 2007 Author Posted October 8, 2007 Exactly what I needed. Thanks Chris. I guess I have skimmed over the 'repeat' function all this time. It works perfectly!! At first I mistakenly put it at the end, but then was VERY impressed with how as I moved it up the list in the program, that it automatically indented the following lines to make it clear which portion would be repeated. Is there any way to have just a section in the middle repeat? I don't need it in this case, but am curious. Quote
Chris Jahn Posted October 8, 2007 Posted October 8, 2007 Theres no "official" 'End Repeat' entry, but there is a way to do it. 'Repeat' repeats everything to the end of the list, or to the next 'Repeat' statement. Therefore, just put 'Repeat 1 time' at the end of your loop. This essentially runs the remaining actions one time (or up to the next Repeat if you have another one). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.