Hello,
I have not been using Smart Macros for long. I thought I was doing OK, but then I started running into unexpected results that I don't understand. I saw some things mentioned in the forum that may relate to my problems but I'm not clear about it all, so I'm looking for further help. I apologise if any of this is repetitive, but please bear with me. I hope someone can explain these things so that I understand them.
The problems I'm running into with my macros are in three general areas: Chained macro conditions, subroutines (in other words, macros triggering other macros), and in-line delays.
First, the chained macro conditions:
Apparently, I don't get this stuff; When I have chained conditions, I don't know how to control the order that the conditions will be tested, and also I don't know whether more than one macro in the chain will run under any particular conditions. For example, I have several sets of macros that follow the same template, where the first macro's condition is that it's nighttime and a particular monitored code is OFF, and the second macro's condition is just that the particular monitored code is OFF. My intended result is for neither macro to execute if the monitored code is ON, only the second macro to execute during daytime when the monitored code if OFF, and both macros to execute at night when the monitored code if OFF. (A separate code is the trigger for these macros). Unfortunately, not only can't I get this to work as I want, but I can't even get it to behave consistently from time to time. Sometimes only one of the macros executes when the conditions are met for both, but it is not predictable as far as which one will execute. I tried to change the conditions so that the first macro tests for only the monitored code and the second tests for only nighttime, but this also produced confusing results.
So, can someone please explain how chained macro conditions get evaluated? First of all, what determines the order in which the chained conditions are tested? (I assumed this would occur in the left-to-right order that they appear in the chain window, but apparently not. Are they evaluated in the order that the macros were created, instead?)
Second, if the first macro's conditions evaluate as true, does it even test the conditions of the other macros in the chain? Or, does it test the conditions for EACH of the chained macros, and try to execute ALL of the ones whose conditions are true?
Third, does the system support situations where the conditions for more than one of the chained macros can be true at the same time, or do they have to be designed such that the conditions are all mutually-exclusive? (If so, how do I do this when there are a maximum of only three conditions available per macro?) Or, am I totally misunderstanding how to use the conditions? (I sure am confused!)
Subroutines:
What happens (or should I say, what is SUPPOSED TO happen) when a macro calls another macro? Does it behave like a subroutine call, where the caller waits while called subroutine executes, or does it try to run both the caller and the called macros at the same time? I really can't tell what it is doing in these cases, but it looks like things get REALLY fouled up. Am I not doing this stuff properly?
Delays:
I have trouble with delays not occurring when expected. This is especially true when a subroutine is involved. Usually what happens is that it appears to blow right through the delays without producing any delay time between the previous and subsequent commands. This seems to happen mostly with delays over five seconds. By accident, I discovered that if two delays exist one right after the other, then things seem to work better. For example, it may ignore a single nine-second delay, but if I put in a second delay of one second right after the nine-second delay, then I see an effective delay of 10 seconds. Why is this necessary? How do in-line delays work, anyway?
I'm VERY confused and frustrated over all this stuff. Can anyone clear this up for me?
Thanks!
JK