- Posts: 133
- Thank you received: 5
Welcome to the Allonis forum! Tell us and our members who you are, what you like and why you became a member of this site. We welcome all new members and hope to see you around a lot!
command and or
- Sat32
- Topic Author
- Offline
- User
-
Less
More
2 years 4 months ago #1489
by Sat32
command and or was created by Sat32
Does any one know is there a way to use AND: OR: in macro's and how it would be written
"if|IsNE##{{av_47_power}}##1## AND: if|IsNE##{{av_49_power}}##on## DO|command##elseDo|command"
Also what happened to the WaitUntill command in the command builder still listed as No Such Command "Not Available"
is that going to be added or fixed?
Thanks
"if|IsNE##{{av_47_power}}##1## AND: if|IsNE##{{av_49_power}}##on## DO|command##elseDo|command"
Also what happened to the WaitUntill command in the command builder still listed as No Such Command "Not Available"
is that going to be added or fixed?
Thanks
Please Log in to join the conversation.
- andrew
- Offline
- User
-
Less
More
- Posts: 339
- Thank you received: 28
2 years 4 months ago - 2 years 4 months ago #1492
by andrew
Replied by andrew on topic command and or
You could replicate simple ANDs and ORs by nesting IFs although it will get complicated quickly. For instance:
if A and B then
do this
could be written:
And:
if A or B then
do that
could be written:
You just need to translate that into myServer syntax.
Andrew
if A and B then
do this
could be written:
Code:
if A then
if B then
do this
And:
if A or B then
do that
could be written:
Code:
if A then
do that
if B then
do that
You just need to translate that into myServer syntax.
Andrew
Last edit: 2 years 4 months ago by andrew.
Please Log in to join the conversation.
- Sat32
- Topic Author
- Offline
- User
-
Less
More
- Posts: 133
- Thank you received: 5
2 years 4 months ago #1496
by Sat32
Yeah thats the hard part the header on the nested command syntax says Beta
so I'm not sure it's even impimented and there's no working examples in the documentaion.
here is what i was testing.
macro|
// test!
IF (livingroom_avamp_id = 50) THEN
Lighting|8~Off;
ENDIF
Not sure if variables need to be wrapped in {{brackets}} or not
Tried both neither worked.
Replied by Sat32 on topic command and or
You just need to translate that into myServer syntax.
Andrew
Yeah thats the hard part the header on the nested command syntax says Beta
so I'm not sure it's even impimented and there's no working examples in the documentaion.
here is what i was testing.
macro|
// test!
IF (livingroom_avamp_id = 50) THEN
Lighting|8~Off;
ENDIF
Not sure if variables need to be wrapped in {{brackets}} or not
Tried both neither worked.
Please Log in to join the conversation.
- andrew
- Offline
- User
-
Less
More
- Posts: 339
- Thank you received: 28
2 years 4 months ago - 2 years 4 months ago #1497
by andrew
Replied by andrew on topic command and or
The one line syntax should work (although it's very confusing). From the docs, if a=3 then do this else do that is written:
if|isequal##a##3##do this##do that
and then you can substitute another if/then instead of 'do this' or 'do that', but you have to use different delimiters to enable it to parse so it looks something like:
if|isequal##a##3##if|isequal&&b&&4&&do one&&do two##do that
Andrew
if|isequal##a##3##do this##do that
and then you can substitute another if/then instead of 'do this' or 'do that', but you have to use different delimiters to enable it to parse so it looks something like:
if|isequal##a##3##if|isequal&&b&&4&&do one&&do two##do that
Andrew
Last edit: 2 years 4 months ago by andrew.
The following user(s) said Thank You: Sat32
Please Log in to join the conversation.
- Sat32
- Topic Author
- Offline
- User
-
Less
More
- Posts: 133
- Thank you received: 5
2 years 4 months ago #1498
by Sat32
Replied by Sat32 on topic command and or
that was it never even looked at delimiters.
Thanks
Now what about WaitUntill command?
I think a lot could be done with it.
Thanks
Now what about WaitUntill command?
I think a lot could be done with it.
Please Log in to join the conversation.
- andrew
- Offline
- User
-
Less
More
- Posts: 339
- Thank you received: 28
2 years 4 months ago #1499
by andrew
Replied by andrew on topic command and or
My 'just' in 'You just need to translate that into myServer syntax' was doing a bit of heavy lifting...
Andrew
Andrew
Please Log in to join the conversation.
Time to create page: 0.176 seconds