Difference between revisions of "Loadbuf"
From Scriptwiki
m (Removed finger window information.) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Loads the specified number of lines from the end of the file of filename into the specified window. | Loads the specified number of lines from the end of the file of filename into the specified window. | ||
− | /loadbuf [lines] [- | + | /loadbuf [lines] [-apirslecNnomt<topic>] <window | dialog id> <filename> |
===Switches=== | ===Switches=== | ||
<table> | <table> | ||
− | |||
<tr><td>-a</td><td>loads the text into the active window.</td></tr> | <tr><td>-a</td><td>loads the text into the active window.</td></tr> | ||
<tr><td>-p</td><td>forces lines of text to wrap when added to the window.</td></tr> | <tr><td>-p</td><td>forces lines of text to wrap when added to the window.</td></tr> | ||
<tr><td>-i</td><td>makes sure that lines are indented if they wrap.</td></tr> | <tr><td>-i</td><td>makes sure that lines are indented if they wrap.</td></tr> | ||
<tr><td>-r</td><td>clears the contents of the output window.</td></tr> | <tr><td>-r</td><td>clears the contents of the output window.</td></tr> | ||
− | <tr><td>-s | + | <tr><td>-s</td><td>apply the command to the status window.</td></tr> |
<tr><td>-l</td><td>applies the command to the side-listbox in a custom window.</td></tr> | <tr><td>-l</td><td>applies the command to the side-listbox in a custom window.</td></tr> | ||
<tr><td>-e</td><td>evaluates variables and identifiers in the line being read.</td></tr> | <tr><td>-e</td><td>evaluates variables and identifiers in the line being read.</td></tr> | ||
Line 17: | Line 16: | ||
<tr><td>-t</td><td>loads the text under the [topic] section in an INI or plain text file.</td></tr> | <tr><td>-t</td><td>loads the text under the [topic] section in an INI or plain text file.</td></tr> | ||
</table> | </table> | ||
+ | |||
==Example== | ==Example== | ||
/loadbuf 20 @test info.txt | /loadbuf 20 @test info.txt |
Latest revision as of 01:23, 23 June 2013
Loads the specified number of lines from the end of the file of filename into the specified window.
/loadbuf [lines] [-apirslecNnomt<topic>] <window | dialog id> <filename>
Switches
-a | loads the text into the active window. |
-p | forces lines of text to wrap when added to the window. |
-i | makes sure that lines are indented if they wrap. |
-r | clears the contents of the output window. |
-s | apply the command to the status window. |
-l | applies the command to the side-listbox in a custom window. |
-e | evaluates variables and identifiers in the line being read. |
-cN | specifies the default color for lines. |
-n | logs the loaded text to a log file, if logging is enabled for that window. |
-m | to be used with -n, indicates that the text is already timestamped. |
-o | indicates that you have specified [dialog id] parameters instead of a window name in order to load text into a custom dialog control. |
-t | loads the text under the [topic] section in an INI or plain text file. |
Example
/loadbuf 20 @test info.txt
This loads the last 20 lines of info.txt into custom window @test.
/loadbuf 10-40 @test info.txt
This loads lines 10 to 40 of info.txt into custom window @test.