Project

General

Profile

$group » History » Revision 6

Revision 5 (Per Amundsen, 12/26/2018 08:54 PM) → Revision 6/7 (Per Amundsen, 12/13/2019 06:32 PM)

_Added in 1.9.0_ 

 *$group(#|N)* 

 Returns the name or status of a [[Scripting_Groups|scripting group]] in a script. 

 _See also [[/enable]], [[/disable]]._ 

 *Parameters* 

 #|N - Group name or if N = 0, number of groups, otherwise the Nth group. 

 *Properties* 

 .status - Returns on or off. 
 .fname - Returns the script filename in which the group exists. 
 .name - Returns name of the group. 
 .line - Line in the script where the group starts. *(AdiIRC only)* (AdiIRC only) 

 *Examples* 

 <pre> 
 ; Create a group. 
 #example on 
 alias Example { 
   echo -ag Group works 
 } 
 #example end 

 ; Print number of groups. 
 //echo -ag $group(0) 

 ; Print the '#example' group status. 
 //echo -ag #example1 is $group(#example1).status 

 ; Disable the '#example' group 
 /disable #example 

 ; Print the '#example' group status again. 
 //echo -ag #example1 is $group(#example1).status 
 </pre>