Easy? background sc...
 
Notifications
Clear all

Easy? background script - help needed pls!

25 Posts
6 Users
0 Reactions
8,142 Views
rokkett
Posts: 441
(@rokkett)
Reputable Member
Joined: 17 years ago

This technique fixed that problem for me. Make sure the program is set up so each sequence uses its own plugin configuration. Do not use the first two options - use the programs plugin setup or the use a profile options.

Now make a short 10 second or so sequence that uses no plugins. Place this sequence first in your program.

This will give the background script a couple of more seconds to release the serial port before the second sequence tries to use it.


Reply
Posts: 2128
(@livermore-dad)
Famed Member
Joined: 16 years ago

My Background script runs when I run it manually, but vixen doesn't seem to be firing the background script when i select it as "my background script". What do I have to do to get vixen to fire my background script?

I have no shows scheduled at this time, but just want to run my background script for the rest of the evening.

Sequence set background sequence has been provided my script name. I've stopped and started vixen.

Do I have to schedule this?


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

Tools->Preferences->Background Items->Enable Background script


Reply
Posts: 2128
(@livermore-dad)
Famed Member
Joined: 16 years ago
rokkett wrote:Tools->Preferences->Background Items->Enable Background script

Is this written in big bold letters somewhere and I'm just a doof for not know it?!?!

Thank you sir, I'm up and running

Tory


Reply
A Marchini
Posts: 426
(@a-marchini)
Reputable Member
Joined: 19 years ago

I thought I would throw this out there. I generally have a continuously running background script. It starts up early evening and runs late , after the show times are over. So here is scripting with time... just to add to the thread.


void Start() {
    Off(All);

    DateTime now = DateTime.Now; //get the current time

    //The DateTime constructor goes (YYYY, MM, DD, HH, MM, SS)
    DateTime start;// Construct a place to store the begin time
    DateTime end ; // Construct a place to store the end time

    // need a forever loop
    while (true)
    {

        // start - Time to begin this little show
        start = new DateTime(now.Year, now.Month, now.Day, 17, 00, 00);

        // end - time to end this sequence. you don't want the lights on all night
        end = new DateTime(now.Year, now.Month, now.Day, 21,30, 00);

        while (now.CompareTo(start) >= 0 && now.CompareTo(end) <= 0)
        {
            // Do whatever you want to do over and over here 
            // it will execute between the start and end times you 
            // select
            On(Light1);
    
            now = DateTime.Now;  //update the current time
        }

        Off(All);

        // Turn something off for a significant amount of time.
        // if you don't the computer will beat itself to death executing a tight
        // loop.

        Off(Light1, At(10), For(5).Seconds, Wait);
        
        now = DateTime.Now; //get the current time

    }
}

P.S. You know... now that I look at this I think it is wrong.
I seem to be constructing a new time element each time through the loop, and I am not sure that is legal. My standard computer science training makes me think I am just creating a pile of time objects over and over again, but I am not sure of my C# code objects at the moment.


Reply
Page 5 / 5
Share: