Logic Machine Forum
addEventListener - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: addEventListener (/showthread.php?tid=3969)



addEventListener - dave.bolas@se.com - 01.04.2022

Hi,
Is there any way to add event listeners programmatically in the SpaceLynk?
I have a number of objects that I would like to all call the same event handler and then use event.dst to see which control triggered it.
Is this possible?
Regards
Dave


RE: addEventListener - admin - 01.04.2022

Use tags


RE: addEventListener - dave.bolas@se.com - 04.04.2022

Hi Admin,
Thanks for the unbelievably quick response! But I don't understand the answer. I know how to add and remove tags, but still don't understand how that helps me to assign the same event handler to say 100 group addresses. Any guidance would be appreciated.
Regards
Dave


RE: addEventListener - admin - 04.04.2022

Select your tag in the "Group address / tag" drop-down menu when creating an event script. This way any object belonging to the given tag will execute this event script.


RE: addEventListener - dave.bolas@se.com - 04.04.2022

Thank you. So simple and so obvious, and I'd completely missed it! :o)