world.SendToNotepad
Creates a notepad and sends text to it
Prototype
boolean SendToNotepad(BSTR Title, BSTR Contents);
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
See also
| Function | Description |
|---|---|
| ActivateNotepad | Activates a notepad window |
| AppendToNotepad | Appends text to a notepad window |
| CloseNotepad | Closes a notepad window |
| GetNotepadLength | Gets the length of the text in a notepad window |
| GetNotepadList | Gets the list of open notepads - returning their titles |
| GetNotepadText | Gets the text from a notepad window |
| NotepadReadOnly | Make a selected notepad window read-only |
| ReplaceNotepad | Replaces text in a notepad window |
| SaveNotepad | Saves a notepad window to disk |