$line » History » Version 4
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 | 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 | |||
18 | 1 | Per Amundsen | *Example* |
19 | |||
20 | <pre> |
||
21 | ; Create a custom window. |
||
22 | /window @Example |
||
23 | |||
24 | ; Add a few lines to the window. |
||
25 | /aline @Example Test1 |
||
26 | /aline @Example Test2 |
||
27 | /aline @Example Test3 |
||
28 | |||
29 | ; Print number of lines in the window. |
||
30 | //echo -ag $line(@Example, 0) |
||
31 | |||
32 | ; Print the second line in the window. |
||
33 | //echo -ag $line(@Example, 2) |
||
34 | </pre> |