I want to run a simple background script but cannot figure out ho to create it. I know how to write the code.
I go to Sequence->New Event Sequence->Script Project.
I get the error that it is creating a blank script.
I selected Standard.dll from the Script > Modules menu.
When I try to compile I get the error "Value cannot be null Parameter Name:path 2"
Here is the following script(simple to test):
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 (All);
now = DateTime.Now; //update the current time
}
Off(All);
}
What did I do wrong or miss?
