$group » History » Version 7
Per Amundsen, 02/23/2023 12:11 AM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$group(#|N)* |
||
4 | |||
5 | 7 | Per Amundsen | Returns the name or status of a [[Scripting_Groups|Scripting Group]] in a script. |
6 | 1 | Per Amundsen | |
7 | 5 | Per Amundsen | _See also [[/enable]], [[/disable]]._ |
8 | |||
9 | 1 | Per Amundsen | *Parameters* |
10 | |||
11 | 7 | Per Amundsen | table(ktable). |
12 | |*Parameter*|*Description*| |
||
13 | | #<notextile>|</notextile>N | Group name or if N = 0, number of groups, otherwise the Nth group. | |
||
14 | 1 | Per Amundsen | |
15 | *Properties* |
||
16 | |||
17 | 7 | Per Amundsen | table(ktable). |
18 | |*Property*|*Description*| |
||
19 | | .status | Returns on or off. | |
||
20 | | .fname | Returns the script filename in which the group exists. | |
||
21 | | .name | Returns name of the group. | |
||
22 | | .line | Line in the script where the group starts. *(AdiIRC only)* | |
||
23 | 1 | Per Amundsen | |
24 | *Examples* |
||
25 | |||
26 | <pre> |
||
27 | 5 | Per Amundsen | ; Create a group. |
28 | 1 | Per Amundsen | #example on |
29 | alias Example { |
||
30 | echo -ag Group works |
||
31 | } |
||
32 | 2 | Per Amundsen | #example end |
33 | 1 | Per Amundsen | |
34 | ; Print number of groups. |
||
35 | //echo -ag $group(0) |
||
36 | |||
37 | ; Print the '#example' group status. |
||
38 | //echo -ag #example1 is $group(#example1).status |
||
39 | |||
40 | ; Disable the '#example' group |
||
41 | /disable #example |
||
42 | |||
43 | ; Print the '#example' group status again. |
||
44 | //echo -ag #example1 is $group(#example1).status |
||
45 | </pre> |