| Name | GetStyleInfo |
|---|---|
| Type | Method |
| Summary | Gets details about a specified style run for a specified line in the output window |
| Prototype | VARIANT GetStyleInfo(long LineNumber, long StyleNumber, short InfoType); |
| Description | Returns details about any style run for 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. The style number can be from 1 (the first style on the line) to the number of styles in that line. You can use "World.GetLineInfo(LineNumber, 11)" to find the number of styles in each line. You can obtain one of 15 "types" of information about the style by specifying an "InfoType". The possible InfoTypes are: 1: text of style (string) 2: length of style run (short) 3: starting column of style (short) 4: action type - 0=none, 1=send to mud, 2=hyperlink, 3=prompt (short) 5: action (eg. what to send) (string) 6: hint (what to show) (string) 7: variable (variable to set) (string) 8: true if bold (boolean) 9: true if underlined (boolean) 10: true if blinking (boolean) 11: true if inverse (boolean) 12: true if changed by trigger from original (boolean) 13: true if start of a tag (action is tag name) (boolean) 14: foreground (text) colour in RGB (long) 15: background colour in RGB (long) You could use this function to "reassemble" lines with ANSI codes or other markup, by putting appropriate codes around each style run. For instance, if the "bold" flag was set, you might use <b> ... </b> . The "action type", "action", "hint" and "variable" fields are used by MXP. See the MXP write-ups on the MUSHclient forum for more detail about what they are used for. The colour codes are in RGB - you could use NormalColour or BoldColour to work out which ANSI colour they corresponded to (note, they might not correspond to any ANSI colour if MXP, or world.note has been used to output non-standard colours). Note: Available in MUSHclient version 3.18 onwards. |
| VBscript example | |
| Jscript example | |
| PerlScript example | |
| Returns | The specified information about the style run, as described above. |
See also ...