Jump to content
C4 Forums | Control4

Using macros


Recommended Posts

One thing that I find rather irritating is that when one calls a macro, the macro runs but the code seems to continue simultaneous. Is there a way to avoid this?

I use macros to store code used regularly rather than to cause two (or mores) streams of code to run simultaneously.

My challenge is that when I run a macro, I then need to program a delay to allow the macro to finish before continuing... When I run a macro within a macro, this becomes much more complex as the length of the delay becomes exponential.

Hope this makes sense and my question is, 'is there any way to halt the code until the macro concludes rather than using trial and error to guess the length of the delay required?

Link to comment
Share on other sites


No to halt and continue COMMANDS, though if you want to STOP a macro or part of a macro there are STOP and BREAK (break meaning go one step out of an indented if statement) options.

 

There may be better ways of accomplishing what you're looking for though - one option is to use a variable at the start of macro 1 that sets an execute to false.

For example:

 

When Macro 1 is executed

set variable hold to true

 

..

 

everything else

..

 

set variable hold to false

 

 

Then in Macro 2

When Macro 2 executes

WHILE variable hold is true

-delay 100ms

...the rest

Link to comment
Share on other sites

Archived

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.