| Name | GetLineInfo |
|---|---|
| Type | Method |
| Summary | Gets details about a specified line in the output window |
| Prototype | VARIANT GetLineInfo(long LineNumber, short InfoType); |
| Description | Returns details about any line in the output buffer (window). The line number can be from 1 (the first line) to the number of lines in the output window. You can use "World.GetLinesInBufferCount" to find how many lines are currently in the output window. This number is different from the sequential number of the line since the world opened. For example, if your buffer size is 5000 lines, and you have received 8000 lines, then the last line will be line 3000 in the buffer but "actual line number" (selector 10 below) will return 8000. You can obtain one of 11 "types" of information about the line by specifying an "InfoType". The possible InfoTypes are: 1: text of line (string) 2: length of text (short) 3: true if newline, false if not (boolean) 4: true if world.note (boolean) 5: true if player input (boolean) 6: true if line logged (boolean) 7: true if bookmarked (boolean) 8: true if MXP horizontal rule (<hr>) (boolean) 9: date/time line arrived (date) 10: actual line number (not line number in buffer) (long) 11: count of style runs (long) The text of the line is the actual text you see on the screen. If "newline" is true then this line is the end of a paragraph (ie. had a newline at the end of it). You can reassemble paragraphs by concatenating lines as found, and then adding a newline (carriage-return, linefeed) whenever "newline" is true. MUSHclient automatically preserves the space at the end of each line, so it is unnecessary to add another of your own. If "indent paragraphs" option is set in MUSHclient the space will be at the start of the next line, rather than the end of the previous line. If "world.note" is true this is a "note" line, not MUD output. If "player input" is true, then this line is an echoed command, not MUD output. The count of styles runs can be used in conjunction with GetStyleInfo to further break up individual lines into style runs (eg. colour changes, bold, underline, etc.). Note: Available in MUSHclient version 3.18 onwards. |
| VBscript example | |
| Jscript example | |
| PerlScript example | |
| Returns | The specified information about the line, as described above. |
See also ...