Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ AddTriggerEx trigger_flag.xxx

AddTriggerEx trigger_flag.xxx

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Magellan   (15 posts)  Bio
Date Mon 02 Jul 2018 03:42 AM (UTC)
Message
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>

Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 02 Jul 2018 06:44 AM (UTC)

Amended on Mon 02 Jul 2018 06:46 AM (UTC) by Nick Gammon

Message
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

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


8,641 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.