Hey there everyone,
Can someone please give a little guidance on how to use and write a simply script that will turn on my lights @ 5:30 and off @ 11:00? I found this code but not sure how to use it. I played with the time to see if I could get it to fire off but no luck.
void Start() {
Off(All);
DateTime now = DateTime.Now; //get the current time
//The DateTime constructor goes (YYYY, MM, DD, HH, MM, SS)
DateTime start = new DateTime(now.Year, now.Month, now.Day, 17, 30, 00);
DateTime end = new DateTime(now.Year, now.Month, now.Day, 23, 00, 00);
//We only want the channels to turn on while the current time is
//between 5:30 and 11 pm
while (now.CompareTo(start) >= 0 && now.CompareTo(end) <= 0)
{
On (Channels(Tree_1), At(100));
On (ChannelRange(1,15), At(100));
On (ChannelRange(18,7), At(100));
On (ChannelRange(27,8), At(100));
Random (ChannelRange(15,2), 50, For(50).Second);
now = DateTime.Now; //update the current time
}
}
Thanks for your time,
Bobby
no one.. not a single suggestion 🙁 total bummer
I think people are so busy trying to get their systems up and running that the programming side of things has taken a back seat... Give it a couple days and let folks get past Thanksgiving which is the general "deadline" most folks put on themselves for going live...
Forgot to mention...
You can set up a "program" in Vixen and set it to turn on at a specified time, and then have it repeat until the "off" time.
You can also set up your computer using the Windows Scheduler to automatically start Vixen at a specific time of the day, too.
Lastly, your computer's CMOS settings probably have a selection to automatically power on the computer at a specific time, too.
So there are other ways around the issue that you can explore...
Why not use Vixen to do so? It has a built in timer and if it doesnt quite meet your criteria, you can always manually modify the timers file to get more specific.
Thanks guys... I was able to get around the issue. Was just hoping to pointed toward a clear explanation of how to use the scripting part of Vixen. Thanks again and good luck with your display's!!!
