$line » History » Version 2
Per Amundsen, 10/02/2015 12:36 AM
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 | .state - Returns [[$true]] if the line is selected in a side-listbox, otherwise [[$false]]. |
||
16 | .color - Returns the line or nick color. |
||
17 | |||
18 | |||
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> |