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.

save mode to array and modify
#2
Create virtual objects that will contain the selected modes. Use an addressing scheme that allows to easily calculate the output object address. For example output is 1/2/3 and mode is 32/2/3. Assign a common tag to all mode objects.

Event script example where event value is the selected mode. Only objects where the mode is the same as the event value are affected.
Code:
value = event.getvalue()
objects = grp.tag('mode')

for _, object in ipairs(objects) do
  if object.value == value then
    output = object.address:gsub('^32/', '1/')
    grp.checkwrite(output, 123)
    os.sleep(0.1)
  end
end
Reply


Messages In This Thread
RE: save mode to array and modify - by admin - 19.07.2024, 10:35
RE: save mode to array and modify - by Daniel - 22.07.2024, 15:41

Forum Jump: