fdastoor Posted November 18, 2008 Share Posted November 18, 2008 The toggle function turns lights on and off like a switch. I am having difficulty having this function do the same thing but instead of abruptly turning lights on and off how can it be used to have the light levels ramp up and down? Link to comment Share on other sites More sharing options...
slemay Posted November 18, 2008 Share Posted November 18, 2008 Don't use toggle... instead tell it to ramp lights to 100% over 5 seconds etc... if you're trying to put it into a single button - then you'll have to create a variable and track the state of the light AND use the script above. Link to comment Share on other sites More sharing options...
fdastoor Posted November 18, 2008 Author Share Posted November 18, 2008 could you please elaborate or post an example. Thanks for the help Link to comment Share on other sites More sharing options...
slemay Posted November 18, 2008 Share Posted November 18, 2008 How about you explain what you're trying to do better, and I'll post a better example for ya? Link to comment Share on other sites More sharing options...
fdastoor Posted November 18, 2008 Author Share Posted November 18, 2008 I would like to turn a light on and off using a single button the Control4 remote. But, instead of the light just turning on and off I would like it to slowly ramp up and down.Thanks Link to comment Share on other sites More sharing options...
MetFan1 Posted November 18, 2008 Share Posted November 18, 2008 This is what it should look like if its the same. Link to comment Share on other sites More sharing options...
slemay Posted November 18, 2008 Share Posted November 18, 2008 MetFan - that won't work with a "TOGGLE" command. Toggle just tells the system to do the opposite of what it's currently at. If its on, then turn it off etc... FDAStoor - Here's what you want to do:Create a variable: LIGHT STATUS True or False.- When Button x is pressed: - If LIGHT STATUS is TRUE - Ramp Light to 0 over 10 seconds - SET LIGHT STATUS to FALSE - STOP - If LIGHT STATUS is FALSE - Ramp Light to 100 over 10 seconds - SET LIGHT STATUS to TRUE - STOPThe "STOP" tells the programming not to proceed after it's done with that statement. Hope this helps,Shawn Link to comment Share on other sites More sharing options...
fdastoor Posted November 19, 2008 Author Share Posted November 19, 2008 Thank you Link to comment Share on other sites More sharing options...
MetFan1 Posted November 19, 2008 Share Posted November 19, 2008 My appologies, I thought the dimmer acted on its settings no matter how it was turned on or off. Link to comment Share on other sites More sharing options...
fdastoor Posted November 19, 2008 Author Share Posted November 19, 2008 I am missing one very simple point. How do you get the command lines Below the If statements to indent? No matter what I do all the statements line up on the left. As a result The program is not executing as it should. I tried dropping the second line on the first line and it just pushes the 'If Variable' command line down.And, If I drag the 2nd line into the script box it always lines up with the first line.I am being stupid, I know but Rather that than remain ignorant, I am asking.Please advise. Thanks again for all the help Link to comment Share on other sites More sharing options...
fdastoor Posted November 19, 2008 Author Share Posted November 19, 2008 I finally figured out that by dropping the command on the question mark the commands become a child of the IF statement.Everything works and thanks to you all I now understand variables.Have a good day Link to comment Share on other sites More sharing options...
slemay Posted November 19, 2008 Share Posted November 19, 2008 Glad to hear it! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.