$ini » History » Version 4
Per Amundsen, 10/17/2015 08:23 AM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$ini(file,topic|N,[item|N])* |
||
4 | |||
5 | 2 | Per Amundsen | Returns the name/Nth position of the specified topic/item in an INI/text file. |
6 | |||
7 | 3 | Per Amundsen | _See also [[$readini]]._ |
8 | 4 | Per Amundsen | _Same as [[$initopic]]._ |
9 | 1 | Per Amundsen | |
10 | *Parameters* |
||
11 | |||
12 | file - File to read from. |
||
13 | topic|N - Topic or the Nth topic, if N = 0 number of topics, otherwise the Nth topic. |
||
14 | [item|N] - Item or the Nth item, if N = 0 number of item, otherwise the Nth item. (optional) |
||
15 | |||
16 | *Examples* |
||
17 | |||
18 | <pre> |
||
19 | ; Print number of topics in '$adiircini'. |
||
20 | //echo -ag $ini($adiircini,0) |
||
21 | |||
22 | ; Print the name of the first topic in '$adiircini. |
||
23 | //echo -ag $ini($adiircini,1) |
||
24 | |||
25 | ; Check if the topic 'Messages' exists. |
||
26 | //echo -ag $ini($adiirc,Messages) |
||
27 | </pre> |