AddTriggerEx trigger_flag.xxx

Posted by Magellan on Mon 02 Jul 2018 03:42 AM — 2 posts, 11,100 views.

#0
Quote:

Lua notes

The trigger sequence is optional and defaults to 100.

The trigger flags are built into the "trigger_flag" table, as follows:

trigger_flag.Enabled = 1
trigger_flag.OmitFromLog = 2
trigger_flag.OmitFromOutput = 4
trigger_flag.KeepEvaluating = 8
trigger_flag.IgnoreCase = 16
trigger_flag.RegularExpression = 32
trigger_flag.ExpandVariables = 512
trigger_flag.Replace = 1024
trigger_flag.Temporary = 16384
trigger_flag.LowercaseWildcard = 2048



been trying to work out how to do multiple trigger flags with the addtrigger and addtriggerex function. is this not a possible thing or what would the syntax be for lets say for example, enabled, regular expression and expand variables.


<aliases>
  <alias
   match="testing"
   enabled="y"
   expand_variables="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>AddTriggerEx("Custom_Trigger", "HRS* *  * * on * :: *(*): *", "say \%1,\%2,\%3,\%4,\%5,\%6,\%7,\%8", trigger_flag.Enabled, custom_colour.NoChange-1, -1, "", "", 12,100)
Note ("testing alias for addtrigger function")</send>
  </alias>
</aliases>

Australia Forum Administrator #1
They are bit masks, so you add them together (each one is a power of 2). So, for example:


trigger_flag.Enabled + trigger_flag.OmitFromOutput


Quote:

what would the syntax be for lets say for example, enabled, regular expression and expand variables



trigger_flag.Enabled + trigger_flag.RegularExpression + trigger_flag.ExpandVariables