Suppose that I wanted to make the following statements for one loop:
(A AND B) OR (C AND D) OR (E AND F)
Macroscheduler will not accept an if statement structured in that manner.
Would this be the correct way to structure it?
If>{(((A) AND (B)) OR (((C) AND (D)) OR ((E) AND (F))))}
Let me know if that's the correct syntax, thanks.
Complex IF Statement
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, but if A, B, C, D E and F are variables they need to be in % symbols. Also you probably need a comparison:
If{( ( (%A%="Something") AND (%B%="Something) ....
Since regular MacroScript doesn't have real booleans you're probably comparing strings. Put strings in quotes. Numbers on their own.
See the help file topic "Complex Expressions".
If{( ( (%A%="Something") AND (%B%="Something) ....
Since regular MacroScript doesn't have real booleans you're probably comparing strings. Put strings in quotes. Numbers on their own.
See the help file topic "Complex Expressions".
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Junior Coder
- Posts: 26
- Joined: Fri May 16, 2008 12:30 pm
-
- Junior Coder
- Posts: 26
- Joined: Fri May 16, 2008 12:30 pm
Could someone possibly take a look at this if statement and tell me where the errors lay?
IF>{(((%hour%=00) AND (%minutes%>=30)) OR (((%hour%>=01) AND (%hour%=12) AND (%hour%=21) AND (%hour%<23)) OR (((%hour%=23) AND (%minutes%=00))))))))}
Thanks
EDIT: Please disregard; I found the error, my variable is hours not hour. 8)
IF>{(((%hour%=00) AND (%minutes%>=30)) OR (((%hour%>=01) AND (%hour%=12) AND (%hour%=21) AND (%hour%<23)) OR (((%hour%=23) AND (%minutes%=00))))))))}
Thanks
EDIT: Please disregard; I found the error, my variable is hours not hour. 8)