Page 1 of 1
Scripts turns off operations on completion
Posted: Wed Aug 05, 2015 10:39 pm
by Jimmy T.
Hi All,
Using 4.9.1 on MAC & Win
I have scripts that stop all my lights then turn on another scene, chase or a series of lights. With this version which I'm now sitting down with the scripts turn on the fixture but then turn them off at the end of the script.
I had to go back to 4.8.5 and it would run the scripts without turning everything off at the end.
Thanks
Jimmy
Re: Scripts turns off operations on completion
Posted: Wed Aug 05, 2015 11:10 pm
by mcallegari
Hi Jimmy, this is weird cause the last changes on the Script function have been done in Dec 2014.
Can you attach a simple workspace to reproduce what you see ?
Re: Scripts turns off operations on completion
Posted: Fri Aug 07, 2015 12:17 am
by Jimmy T.
Mr M.
Here is a sample I did to show it.
1. Press Yellow and light comes on.
2. Press Stop and Yellow should go off and red come on according to the script.
If you put a wait statement in it it will hold until the wait ends.
I'm using chasers as a work-around right now.
Be interested to know whats going on here.
Thanks
Re: Scripts turns off operations on completion
Posted: Sun Aug 09, 2015 12:38 pm
by mcallegari
Hey Jimmy,
I've checked your project.
What you see is actually the correct behaviour. I know it might look awkward, but here's the techy insight:
A Script is a Function like all the others in QLC+. Internally, it keeps track of the (children) Functions it starts.
When the whole Script code has been processed, all the Functions ran by the Script are stopped, thus triggering the Script stop event as well
If a Script wouldn't do that, you would have running functions in QLC+ that you can't stop anymore from the Virtual Console, except by using the Stop All button (which might stop also Functions that you don't want to stop)
So basically the concept of a Script is that when it ends, QLC+ goes back to the state it was before running the Script.
Re: Scripts turns off operations on completion
Posted: Tue Oct 06, 2015 10:11 am
by lorenzoandreani
Ok, that's right!
It's possible add a command, in the script, to remains active until the button (who initiated the script) is clicked again (or slider goes to 0) ?
Re: Scripts turns off operations on completion
Posted: Tue Oct 06, 2015 10:19 am
by plugz
You can put a wait at the end, with a big number.
Re: Scripts turns off operations on completion
Posted: Tue Oct 06, 2015 2:31 pm
by lorenzoandreani
Yes, i know it is, but not the same thing (also it takes an active timer).
For now i have bypassed it by inserting the script in a collection.