This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

How to stop this script when running
#1
Hi Everyone.

Question one:
This is a scheduled script (script name: Ligths_UP), is there at way to enable/disable it by the use of a grp.adress?

e.g:
if start == true then 
script.enable(Ligths_UP)
else
script.disable(Ligths_UP)


Question Two:
When this script is started i can't stop i from running again. 
It will only stop when value_end is reached.
Is there a way to stop it halfway?

value_sek = grp.getvalue('32/1/4')
value_end = grp.getvalue('32/1/3')
start = grp.getvalue('32/1/1')


-- UP
output = '32/1/2'
for i = grp.getvalue(output) + 1, value_end, 1 do
  grp.write(output, i)
  os.sleep(value_sek)
end

Best regards
Timmi Andersen
Denmark
Reply


Messages In This Thread
How to stop this script when running - by TimmiA - 12.04.2024, 09:21

Forum Jump: