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.
Enable/disable trigger groups from the configuration window
Posted by Kahenraz on Thu 12 Apr 2018 11:08 PM — 2 posts, 14,186 views.
What you can do is make an alias to do this for any group. Try this:
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.
<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.