Guys and Gals, this scripting is killing me. Here is the script I have. I can't get it to compile or, obviously, run. Can any one help? It is the example given in the WIKI modified.
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, 09, 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(Tree1), At(100));
now = DateTime.Now; //update the current time
}
Off(All);
}
What error are you getting? You imported your channels? You selected the Standard.dll module? Your attached plugins don't conflict with other running sequences?
Error:
Value cannot be null.
Parameter name: path2
at System.IO.Path.Combine(String path1, String path2)
at StandardScript.StandardScript.CreateTempSequence(String Directory)
Channels imported.
Standard.dll selected.
Don't understand the attached plugins??
Thanks for your interest in my problem.
OK. Figured out the plugin thing. I now have it set to renard modified. Still same error.
Is this a new script? Try saving it before you compile it....
Yes, it is new. I'll try the save first.
I'm making some progress. I can now turn on Tree1 with the script, but when I stop the script I get this error:
Plugin error
(Router)
An output plugin caused the following exception:
Value cannot be null.
Execution has been stopped.
Also, Tree1 stays on. I have to go to test channels to turn it off.
Saving the script and setting the plugin got me one more step.
If I change the DateTime end to say 5 minutes from now, and execute the script, Tree1 comes on. But, at the end of the 5 minutes the script stops executing and leaves Tree1 on. In this scenario there are no errors given.
The tree staying on is expected behavior when stop the script manually. The execution never gets to the Off() command.
Not sure what the router error is. Nothing else is running? You configured the plugin with the same number of channels you imported, correct?
I am not 100% sure, but I think odd errors will happen at times when stopping a script from that interface. I just tested mine and didn't get any - but I seem to recall routing errors. But I have also switched from renard to DMX recently...
...but I would not be too concerned with that script cancellation error. Run the script past the start and stop times so you can test the entire script. Some errors are runtime and not caught in the compile....
Odd - the final Off() should turn it off before it exits...
Try this to see if the background script is exiting before sending the Off() command to the plugin:
Off(All,For(1).Minutes,Wait);

