The Airplane mode constraint can be used to allow or prevent a macro/feature firing depending on the current state of the airplane mode (on or off)