Background Sequence...
 
Notifications
Clear all

Background Sequence with Scripting HELP !!!

14 Posts
4 Users
0 Reactions
4,154 Views
Posts: 446
Topic starter
(@amigorick)
Honorable Member
Joined: 16 years ago
[#22750]

I am totally new to C+ and writing scripts. I am trying to create a background
sequence to keep the lights on between songs and during the intermission between
programs. I found a script on one of the forums and modified it to suit my needs...I think !
I just want all of the lights to just stay on with very little changes in intensities to start with,
until I get more accustomed to scripts. This script does not work with vixen and gives errors.
Can anyone take a look at it and advise where I have made mistakes? If there are any
additional settings I need to make other than checking the "Background Sequence" box to make it
tell my Renard SS24 what to do please let me know !!! This is frustrating to me !!
ANY HELP WILL BE GREATLY APPRECIATED !!

Here is what I have now.....

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, 22, 00, 00);

//We only want the channels to turn on while the current time is
//between 5:30 and 10 pm
while (now.CompareTo(start) >= 0 && now.CompareTo(end) <= 0)
{
On (ChannelRange(1,24), 75, For (15) .second);
On (ChannelRange(1,24), 85, For (15) .second);
On (ChannelRange(1,24), 95, For (15) .second);

now = DateTime.Now; //update the current time
}

Off(All);


13 Replies
rokkett
Posts: 441
(@rokkett)
Reputable Member
Joined: 17 years ago

What are the errors? Did you import your channels into the script?


Reply
Posts: 210
(@danhouston)
Reputable Member
Joined: 15 years ago
Amigorick wrote:I am totally new to C+ and writing scripts. I am trying to create a background
sequence to keep the lights on between songs and during the intermission between
programs. I found a script on one of the forums and modified it to suit my needs...I think !
I just want all of the lights to just stay on with very little changes in intensities to start with,
until I get more accustomed to scripts. This script does not work with vixen and gives errors.
Can anyone take a look at it and advise where I have made mistakes? If there are any
additional settings I need to make other than checking the "Background Sequence" box to make it
tell my Renard SS24 what to do please let me know !!! This is frustrating to me !!
ANY HELP WILL BE GREATLY APPRECIATED !!

Here is what I have now.....

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, 22, 00, 00);

//We only want the channels to turn on while the current time is
//between 5:30 and 10 pm
while (now.CompareTo(start) >= 0 && now.CompareTo(end) <= 0)
{
On (ChannelRange(1,24), 75, For (15) .second);
On (ChannelRange(1,24), 85, For (15) .second);
On (ChannelRange(1,24), 95, For (15) .second);

now = DateTime.Now; //update the current time
}

Off(All);

I went this route with Vixen and the end while the scripting worked I had too many other challenges with the Vixen scheduler....That led me to discovering xLights. By using xLights as the scheduler I had much greater control, so I just created a regular sequence in Vixen with no audio and then scheduled it in xLights to repeat between shows. I think I added a small bit of scripting in xLights (real easy to do) so that at the end of my last song it would repeat that same sequence if the showtime was not quite over yet.

If you really want some tested Vixen code I can dig mine out and post it here.

As for problems I notice you have a space between the (15) and the ".second" there should not be a space (although Vixen may not care).

If you post the errors you got I'm sure people can help you, but I would definitely give xLights a look as the scheduler and likely be able to avoid the scripting all together.


Reply
Posts: 57
(@nirad68)
Trusted Member
Joined: 18 years ago

did you select the Standard.dll ? Under Scrpits, Modules.


Reply
rokkett
Posts: 441
(@rokkett)
Reputable Member
Joined: 17 years ago
Reply
Posts: 446
Topic starter
(@amigorick)
Honorable Member
Joined: 16 years ago

Error is as follows:

Value cannot be null.
Parameter name: path2

at System.IO.Path.Combine(String path1, String path2)
at StandardScript.StandardScript.CreateTempSequence(String directory)


Reply
Posts: 446
Topic starter
(@amigorick)
Honorable Member
Joined: 16 years ago

That is actually the script I used to base mine on.


Reply
Posts: 446
Topic starter
(@amigorick)
Honorable Member
Joined: 16 years ago

Yes I did.


Reply
Posts: 446
Topic starter
(@amigorick)
Honorable Member
Joined: 16 years ago

That is actually the script I used to base mine on.


Reply
rokkett
Posts: 441
(@rokkett)
Reputable Member
Joined: 17 years ago

Do you have channels defined on the "Channels" tab and the plugins associated and configured with the channels?


Reply
Page 1 / 2
Share: