Jump to content

Program Question


mcrean

Recommended Posts

Posted

This program did not work properly. I was on vacation so Keypadlinc D was On. On Friday and Monday the program ran and executed 'Then' On Sat and Sun the program did not run the 'Then' Path. Is it a parenthesis issue?

 

If
       On Mon, Tue, Wed, Thu, Fri
       Time is  5:30:00PM
    Or On Sat, Sun
       Time is 10:00:00AM
   And Status  'KeypadLinc D (Vacation)' is Off

Then
       Set 'Digital Picture Frame' On

Else
  - No Actions - (To add one, press 'Action')

 

Thanks again.

Posted
This program did not work properly. I was on vacation so Keypadlinc D was On. On Friday and Monday the program ran and executed 'Then' On Sat and Sun the program did not run the 'Then' Path.

Hi Michael,

 

Is it a parenthesis issue?

Yes! Since And has precedence over Or, your program effectively says:

If 5:30pm on Mon, Tue, Wed, Thu, Fri Or (10:00am on Sat, Sun And KPLD is OFF),

whereas what (I believe) you wanted was:

(If 5:30pm on Mon, Tue, Wed, Thu, Fri Or 10:00am on Sat, Sun) And KPLD is OFF.

So, place an And (...) parenthesis around the two time conditions, and you should be good to go.

Guest
This topic is now closed to further replies.

×
×
  • Create New...