Trigger action when all of a and b and c are set – Clear-Com Logic-Maestro User Manual
Page 132
Clear-Com Communication Systems
Eclipse Logic Maestro Instruction Manual
3 - 4
TRIGGER ACTION WHEN ALL OF A AND B AND C
ARE SET
// When control A1 is activated AND control A2 is activated AND control A3 is activated, activate
control FRLY4
using System;
using ClearCom.ScriptHost;
using ClearCom.ScriptLibrary;
using ClearCom.Entities;
using EMS.MapClient;
using EMS.MapClient.Tables;
using EMS.MapClient.Tables.Actions;
using Shared.Enums;
namespace CustomControlMacros
{
public class CustomMacro : ScriptBase
{
public override void OnUserStart()
{
// Fetch the elements we need.
ControlMacro A1 = ControlMacro.GetControl("A1");
ControlMacro A2 = ControlMacro.GetControl("A2");
ControlMacro A3 = ControlMacro.GetControl("A3");
ControlMacro FRLY4 = ControlMacro.GetControl("FRLY4");
// Note that each control can only have one TriggersIf, so create an intermediate control
// to test the first 2 inputs.
ControlMacro intermediate = ControlMacro.CreateControl("IMDTE", true);
intermediate.TriggersIf(A1, Condition.AND, A2);
FRLY4.TriggersIf(intermediate, Condition.AND, A3);
}
}
}