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.

Script with last updated event
#7
Hi,

Try this:

Code:
-- Settings ------------------------------

output = '1/1/1'
min = 14
max = 16

-- Logic ---------------------------------

now = os.date('*t')
if now.hour >= min and now.hour < max then
  if grp.getvalue(output) == false then
   grp.write(output, true)
  end
else
  if grp.getvalue(output) == true then
    grp.write(output, false)
  end
end

BR,

Erwin
Reply


Messages In This Thread
Script with last updated event - by Mr.D - 06.05.2017, 12:03
RE: Script with last updated event - by Mr.D - 06.05.2017, 22:17
RE: Script with last updated event - by Mr.D - 11.05.2017, 19:57
RE: Script with last updated event - by Erwin van der Zwart - 11.05.2017, 22:43
RE: Script with last updated event - by Jørn - 11.05.2017, 20:56
RE: Script with last updated event - by Mr.D - 13.05.2017, 20:56
RE: Script with last updated event - by Mr.D - 16.05.2017, 11:34
RE: Script with last updated event - by Mr.D - 18.05.2017, 07:40

Forum Jump: