$line » History » Version 7
Per Amundsen, 02/09/2017 10:54 PM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$line(@name,N,[T])* |
||
4 | |||
5 | Returns the Nth line of text in the specified window. |
||
6 | |||
7 | *Parameters* |
||
8 | |||
9 | @name - The window to retrieve text from. |
||
10 | N - If N = 0 number of lines, otherwise the Nth line. |
||
11 | [T] - If T = 0 use display area (default) if T = 1, use side-listbox. (optional) |
||
12 | |||
13 | 2 | Per Amundsen | *Properties* |
14 | |||
15 | 4 | Per Amundsen | .state - Returns 1 if the line is selected in a side-listbox, otherwise 0. |
16 | 2 | Per Amundsen | .color - Returns the line or nick color. |
17 | 7 | Per Amundsen | .rgbcolor - For side-listbox returns the line color in rgb format, otherwise returns the rgb line color if any (AdiIRC only) |
18 | 2 | Per Amundsen | |
19 | 1 | Per Amundsen | *Example* |
20 | |||
21 | <pre> |
||
22 | ; Create a custom window. |
||
23 | /window @Example |
||
24 | |||
25 | ; Add a few lines to the window. |
||
26 | /aline @Example Test1 |
||
27 | /aline @Example Test2 |
||
28 | /aline @Example Test3 |
||
29 | |||
30 | ; Print number of lines in the window. |
||
31 | //echo -ag $line(@Example, 0) |
||
32 | |||
33 | ; Print the second line in the window. |
||
34 | //echo -ag $line(@Example, 2) |
||
35 | </pre> |