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.

Scripts for multiple group addresses?
#1
Hi,

I will be periodically writing values of various group addresses to an external MySQL database and will have a common function (writedb) for database connection and writing. I now will have to provide an event script for every group address, something like

Code:
writedb('1/1/10', event.getvalue())

Is there an easier way to this instead of having tons of event scripts (one per group address) with just this one liner, where I manually have to adjust the group address in each and every script?

Thanks & best regards,
Robin
Reply
#2
You can map scripts to tags. Also, you are missing () for getvalue in your example. This example might help as well: http://forum.logicmachine.net/showthread...69#pid1269
Reply
#3
Perfect, that is exactly what I need. Thanks!

Edit: fixed the missing ()
Reply


Forum Jump: