Please login or register.

Login with username, password and session length

Author Topic: ELSE CONFUSION  (Read 25592 times)

JimC

  • Hero Member
  • *****
  • Helpful Post Rating: 41
  • Posts: 631
ELSE CONFUSION
« on: December 01, 2004, 07:23:45 AM »

I’m confused (not that, that is unusual for
me). How does “ELSE” work?
I have two conditional macros triggered by
the same motion sensor. Does the second only
execute if the first does not or do they
both trigger sequentially ?????
Logged
_ _ ...  ..._ _

donald mcmow

  • Hero Member
  • *****
  • Helpful Post Rating: 0
  • Posts: 306
Re: ELSE CONFUSION
« Reply #1 on: December 01, 2004, 10:28:41 AM »

The First macro will execute only if all of
the conditions are true otherwise the
second macro will execute and only if the
conditions in that macro are met. If there
are no conditions in that macro then the
macro will execute. I don't know how many
levels deep you can go but the more macros
the more complicated your conditionals will
seem to be and the greater the chances of
you not understanding why something is not
working when you think it should be. Keep
your thoughts straight as to what you want
to happen and when and you can create the
automated home that you are looking for.
Logged

JimC

  • Hero Member
  • *****
  • Helpful Post Rating: 41
  • Posts: 631
Re: ELSE CONFUSION
« Reply #2 on: December 01, 2004, 11:15:07 AM »

Thanks for the reply Donald.

Am I correct in thinking that if the first
macro executes  the second will not . The
second macro is only looked at if the
conditions for the first are not met?????


Thanks,

Jim
Logged
_ _ ...  ..._ _

X10 Pro

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 1416
Re: ELSE CONFUSION
« Reply #3 on: December 01, 2004, 01:42:55 PM »

Jim: That's right -- the second, and any
subsequent macros, doesn't run (and any
conditions it has aren't tested) if the first
macro runs. At most, only one macro runs when
the given trigger is received.
Logged

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: ELSE CONFUSION
« Reply #4 on: December 01, 2004, 11:57:23 PM »

"...I don't know how many levels deep you
can go but the more macros the more
complicated your conditionals will seem to
be and the greater the chances of you not
understanding why something is not working
when you think it should be...."

You can say that again!

I'm just now getting to the point where I
can predict what happens with 1 else! I
haven't tried adding more yet.

BTW X10.. Is there a limit to the number of
levels deep can you can go with the elses?
How many macros can run concurrently? If a
macro is executing and you trigger it
again, does a 2nd one start, does the macro
restart, or is the 2nd trigger ignored?
Inquiring minds want to know. Thanks.
Logged
BVC let's me tell my camera where to go!
:) Murphy is my beta testing pal. He helps me find problems whether I like it or not. :)

92ranger

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: ELSE CONFUSION
« Reply #5 on: October 17, 2017, 09:44:57 PM »

Thanks for the reply Donald.
 
Am I correct in thinking that if the first
macro executes  the second will not . The
second macro is only looked at if the
conditions for the first are not met?????
 
 
Thanks,      What if I have four Cameras on perimeter (VT38A's) do I need a macro for each one?
 
Jim
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.