06.12.2024, 21:17
Hi all,
I'm using some event-based scripts to enable/disable the relevant scripts (to switch from a resident script to another).
For example resident script #1 performs a cyclic rotation of red and green lights every 5 secs while resident script #2 performs a cyclic rotation of red and blue lights every 15 secs.
All works fine but... the problem is that when by means of the event-based script I disable a resident script it doesn't stop immidiately ("halt") but instead it ends its cycle beforeĀ
the other resident script starts.
This is one of the the event-based scripts, where r_script* is a resident script:
value = grp.getvalue('7/1/1')
if (value == true) then
script.disable('r_scritp1')
script.enable('r_script2')
end
Is there a better way to do this? Is there a command to immediately stop e running resident script?
Thanks
I'm using some event-based scripts to enable/disable the relevant scripts (to switch from a resident script to another).
For example resident script #1 performs a cyclic rotation of red and green lights every 5 secs while resident script #2 performs a cyclic rotation of red and blue lights every 15 secs.
All works fine but... the problem is that when by means of the event-based script I disable a resident script it doesn't stop immidiately ("halt") but instead it ends its cycle beforeĀ
the other resident script starts.
This is one of the the event-based scripts, where r_script* is a resident script:
value = grp.getvalue('7/1/1')
if (value == true) then
script.disable('r_scritp1')
script.enable('r_script2')
end
Is there a better way to do this? Is there a command to immediately stop e running resident script?
Thanks