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