Require: IP-Symcon >= 4.4
boolean IPS_SetEventConditionVariableRule (int $EventID, int $ConditionID, int $RuleID, int $VariableID, int $Comparison, variant $Value)
ID of the event to be changed
ID of the condition that contains the rule
Unique ID for this rule. IDs only need to be unique for this group.
ID of the checked variable
Value the checked variable is compared to
If the command succeeds, it returns TRUE, otherwise FALSE.
This function is deprecated. Please use the newer IPS_SetEventConditionVariableRuleStatic function, which has the same parameters and a better naming
This function modifies the rule with the ID RuleID for the condition with the ID ConditionID of the event with the ID EventID. The rule compares the variable with the ID VariableID to the value Value according to the comparison operation Comparison. If no rule with the ID RuleID exists yet, it is created.
If VariableID is 0, the rule with the ID RuleID is deleted.
The variable types Boolean and String only support the first two comparison operations.
The value in Value must match the type of the variable with the ID VariableID.
// Create root condition for event with ID 12345 IPS_SetEventCondition(12345, 0, 0, 0); // Add a rule with ID 2: Variable 23456 < 75 IPS_SetEventConditionVariableRule(12345, 0, 2, 23456, 4, 75); // Delete rule with ID 2 IPS_SetEventConditionVariableRule(12345, 0, 2, 0, 0, 0);