From WikiChip
Difference between revisions of "mirc/groups"
< mirc

(Created page with "Inside the script editor, you can use group to disable/enable a whole piece of code, an alias, an on text event, a menu, a dialog etc. #group_name off alias myalias { echo...")
 
Line 1: Line 1:
 
Inside the script editor, you can use group to disable/enable a whole piece of code, an alias, an on text event, a menu, a dialog etc.
 
Inside the script editor, you can use group to disable/enable a whole piece of code, an alias, an on text event, a menu, a dialog etc.
  
#group_name off
+
<source lang="mIRC">
alias myalias {
+
#group_name off
echo -a hey!
+
alias myalias {
}
+
  echo -a hey!
#group_name end
+
}
 +
#group_name end
 +
</source>
  
 
Effectively disables the '''myalias''' alias. The keyword that can appear after the #group_name on top are "on" to enable it or "off", to disable it. At the bottom the keyword is always "end".
 
Effectively disables the '''myalias''' alias. The keyword that can appear after the #group_name on top are "on" to enable it or "off", to disable it. At the bottom the keyword is always "end".
  
 
You can use {{mIRC|/enable}} #group and {{mIRC|/disable}} #group to enable/disable a group, you can use {{mIRC|$group}} to get the state of a group, its name, and the file in which the group can be found.
 
You can use {{mIRC|/enable}} #group and {{mIRC|/disable}} #group to enable/disable a group, you can use {{mIRC|$group}} to get the state of a group, its name, and the file in which the group can be found.

Revision as of 16:53, 16 August 2018

Inside the script editor, you can use group to disable/enable a whole piece of code, an alias, an on text event, a menu, a dialog etc.

#group_name off
alias myalias {
  echo -a hey!
}
#group_name end

Effectively disables the myalias alias. The keyword that can appear after the #group_name on top are "on" to enable it or "off", to disable it. At the bottom the keyword is always "end".

You can use /enable #group and /disable #group to enable/disable a group, you can use $group to get the state of a group, its name, and the file in which the group can be found.