Gateway Script - If condition 'or' with 'and'

I’m in a gateway tagchange script and I’m looking to do an “if” statement with an ‘or’ and an ‘and’. How is this accomplished?

if gateFootPedal == 1 or BlowerShelfFootLH == 1 or BlowerShelfFootRH == 1 and BlowerShelfMemory < CycleTimeTarget:

I want the first three together in an ‘or’, then the last two in an ‘and’. Hope this is clear.
Thanks!

I may not have completely understood what you were asking, but i think parenthesis are what you are missing. If you have Booleans, you don’t you can simplify.

if (gateFootPedal  or BlowerShelfFootLH) or (BlowerShelfFootRH and BlowerShelfMemory < CycleTimeTarget):
1 Like

Thank you @josborn that is working!