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.

Add scheduler with a single click ?
#5
(15.07.2024, 06:39)admin Wrote: Can be done via a script. This example creates a scheduler for objects from 0/0/1 to 0/0/5.
Code:
webrequest = require('webrequest')

for i = 1, 5 do
  address = '0/0/' .. i

  data = {
    object = buslib.encodega(address),
    active = 'on',
    controlobject = 0,
    name = 'Scheduler ' .. address,
    start_day = 1,
    start_month = 1,
    end_day = 31,
    end_month = 12,
  }

  webrequest('schedulers', 'save', { data = data })
end

how can i add object name for objects from 32/2/1 to 32/2/252.

I don't understand how to use the code below in the code above.

Code:
name = grp.find(event.dst).name

i want to use scheduler names as the name of the scheduler.

   


i added it manually.

   
Reply


Messages In This Thread
RE: Add scheduler with a single click ? - by Simuzer - 17.07.2024, 10:01

Forum Jump: