Difference between revisions of "Loadbuf"

From Scriptwiki
Jump to: navigation, search
 
m (Switches)
Line 3: Line 3:
 
===Switches===
 
===Switches===
 
<table>
 
<table>
<tr><td><b>Switch</b></td><td><b>Meaning</b></td></tr>
 
 
<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>
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

Revision as of 21:26, 8 April 2008

Loads the specified number of lines from the end of the file of filename into the specified window.

/loadbuf [lines] [-apirsglecNnomt<topic>] <window | dialog id> <filename>

Switches

-aloads the text into the active window.
-pforces lines of text to wrap when added to the window.
-imakes sure that lines are indented if they wrap.
-rclears the contents of the output window.
-s / -gapply the command to the status and finger windows respectively.
-lapplies the command to the side-listbox in a custom window.
-eevaluates variables and identifiers in the line being read.
-cNspecifies the default color for lines.
-nlogs the loaded text to a log file, if logging is enabled for that window.
-mto be used with -n, indicates that the text is already timestamped.
-oindicates that you have specified [dialog id] parameters instead of a window name in order to load text into a custom dialog control.
-tloads 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.

See Also