Jump to content
C4 Forums | Control4

Macros or Scripts -- what is better

Recommended Posts

I am looking for personal preference or benefits over using scripts that are fired on Events, or Macros?

From earlier programming experience it appeared to me that I kick off an event, and then have the macro do the work versus the script.

I tried to find Help on macros from control 4 - but once again, Help is very limited.

Just looking for recommendations.


Link to comment
Share on other sites

a macro is somewhere you can offload a bit of programming so that it can be re-used many times, but written only once.

eg. every time i press a button on any light switch i want the doorbell to ring and the lights to flash on and off.

- trigger this programming from the event on every switch (4-6 lines of code multiplied by however many lights).

- put this programming (4-6 lines) into a macro.

- trigger the macro from the event on a light switch (1 line of code multiplied by however many lights).

20 lights, you just saved about 90 odd lines of code, plus, if you ever swap those lights for others, you just replace 1 line of code.

[ programming (scripting) is language based, so there are always several different ways to do anything. i personally like macros, but there are times when macros will not fit the job. hope this helped ]

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.