South Africa C4 user Posted September 6, 2015 Share Posted September 6, 2015 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 More sharing options...
Cyknight Posted September 6, 2015 Share Posted September 6, 2015 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 executedset variable hold to true .. everything else.. set variable hold to false Then in Macro 2When Macro 2 executesWHILE variable hold is true-delay 100ms...the rest Link to comment Share on other sites More sharing options...
South Africa C4 user Posted September 6, 2015 Author Share Posted September 6, 2015 Very clever - I think... I will have to give this some thought but I think your logic could prove very useful! Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.