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.

Event Script
#1
when using event script, we use the event.getvalue() function.
Is there any way to get the grp name in event script?
Reply
#2
https://kb.logicmachine.net/libraries/lua/#grpfindalias
------------------------------
Ctrl+F5
Reply
#3
But that recuires me to know the GA address, can i get that without manually entering it?

Also, is there any way to copy event scripts to multiple GA?
Reply
#4
event.dst contains the group address that triggered the script. Use tags to assign a single script to multiple groups.
Reply
#5
tag based wont work with eventbased, or am i missng something?
Reply
#6
It will, just tag your objects. Create event script with this tag. Drop this and start writing to your objects. See what happens in logs
Code:
log(grp.find(event.dst).name)
------------------------------
Ctrl+F5
Reply
#7
(01.11.2024, 09:20)admin Wrote: event.dst contains the group address that triggered the script. Use tags to assign a single script to multiple groups.

(01.11.2024, 10:37)Daniel Wrote: It will, just tag your objects. Create event script with this tag. Drop this and start writing to your objects. See what happens in logs
Code:
log(grp.find(event.dst).name)

I got the event.dst to work, but I wanted to copy my event script to multiple group adresses, preferably automated copy.
Reply
#8
Do not copy, use tag and single script for all.
------------------------------
Ctrl+F5
Reply
#9
(01.11.2024, 10:45)Daniel Wrote: Do not copy, use tag and single script for all.

Ah, I see. As resident script then?
Reply
#10
Can you explain in more details what are you trying to do?
------------------------------
Ctrl+F5
Reply


Forum Jump: