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
➜ Suggestions
➜ Enable/disable trigger groups from the configuration window
Enable/disable trigger groups from the configuration window
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Kahenraz
(75 posts) Bio
|
Date
| Thu 12 Apr 2018 11:08 PM (UTC) |
Message
| I would really like to be able to enable/disable entire trigger groups from the Configuration -> Triggers window. Yes, I can make an alias to do this but I don't want to make an alias for every group. Then I have to remember the aliases too. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 13 Apr 2018 12:16 AM (UTC) Amended on Fri 13 Apr 2018 12:17 AM (UTC) by Nick Gammon
|
Message
| What you can do is make an alias to do this for any group. Try this:
<aliases>
<alias
match="enablegroup"
enabled="y"
send_to="12"
sequence="100"
>
<send>
local triggers = GetTriggerList ()
if not triggers then
utils.msgbox ("No triggers were found", "Warning")
return
end -- if
groups = { }
for k, trigger in ipairs (triggers) do
group = GetTriggerInfo (trigger, 26)
if #group > 0 then
groups [group] = group
end -- if has a group
end -- for each trigger
result = utils.listbox ("Choose a group", "Group?", groups)
if result then
enable = utils.msgbox ("Enable this group?", "Action", "yesnocancel", "?")
print (enable)
if enable == "cancel" then
return
end -- if cancelled
EnableTriggerGroup (result, enable == "yes")
end
</send>
</alias>
</aliases>
 |
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.
|
This finds all of your groups and then shows a listbox with all their names. At this stage you can cancel to do nothing. Otherwise, choose a group and hit OK. You then see "Enable this group?" with Yes / No / Cancel buttons.
Choosing Yes enables the entire group. Choosing No disables the entire group. Choosing Cancel does not change the group. |
- 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.
10,899 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top