world.SendToNotepad

MUSHclient script function (Method)

Creates a notepad and sends text to it

Prototype

boolean SendToNotepad(BSTR Title, BSTR Contents);

Data type meanings

Description

Creates a notepad window with the nominated title and contents.

The contents are copied "as is" without a trailing newline. If you want a newline you will need to add it yourself. The built-in constant "vbcrlf" can be used for this purpose in Visual Basic.

VBscript example

world.SendToNotepad "Nick's window", "Hello, world" & _
              vbcrlf & "another line"

Jscript example

world.SendToNotepad("Nick's window", 
                    "Hello, world\r\nanother line")

PerlScript example

$world->SendToNotepad("Nick's window", 
                  "Hello, world\r\nanother line");

Python example

world.SendToNotepad("Nick's window", 
                    "Hello, world\r\nanother line")

Lua example

SendToNotepad ("Nick's window", 
               "Hello, world\r\nanother line")

Lua notes

You can supply multiple arguments after the notepad name, which are concatenated together.

Return value

0: Window not created.
1: Window created OK

Related topic

Notepad

See also

FunctionDescription
ActivateNotepadActivates a notepad window
AppendToNotepadAppends text to a notepad window
CloseNotepadCloses a notepad window
GetNotepadLengthGets the length of the text in a notepad window
GetNotepadListGets the list of open notepads - returning their titles
GetNotepadTextGets the text from a notepad window
NotepadReadOnlyMake a selected notepad window read-only
ReplaceNotepadReplaces text in a notepad window
SaveNotepadSaves a notepad window to disk