SaveNotepad
Script function

world.SaveNotepad

DOC_scripting Read about scripting

Type

Method

Summary

Saves a notepad window to disk

Prototype

long SaveNotepad(BSTR Title, BSTR FileName, BOOL ReplaceExisting);

DOC_data_types View list of data type meanings


Description

This saves an existing notepad window to disk.

Title - title of the notepad (used in functions like AppendToNotepad)

FileName - name to save to disk as.

If the file name is empty (ie. "") then it will be saved under its existing file name, if any, or you will be prompted for the name to save it as.

ReplaceExisting - whether to replace an existing file of the same name



VBscript example

world.SaveNotepad "my_notepad", "c:/mushclient/notepad.txt", 0



Jscript example

world.SaveNotepad ("my_notepad", "c:/mushclient/notepad.txt", 0);



PerlScript example

$world->SaveNotepad ("my_notepad", "c:/mushclient/notepad.txt", 0);



Python example

world.SaveNotepad ("my_notepad", "c:/mushclient/notepad.txt", 0)



Lua example

SaveNotepad ("my_notepad", "c:/mushclient/notepad.txt", 0)



Lua notes

The ReplaceExisting flag is optional, and defaults to false.



Return value

1 = saved OK
0 = not saved




See Also ...

Topic

DOC_notepad Notepad

Functions

FNC_ActivateNotepad ActivateNotepad (Activates a notepad window)
FNC_AppendToNotepad AppendToNotepad (Appends text to a notepad window)
FNC_CloseNotepad CloseNotepad (Closes a notepad window)
FNC_GetNotepadLength GetNotepadLength (Gets the length of the text in a notepad window)
FNC_GetNotepadText GetNotepadText (Gets the text from a notepad window)
FNC_MoveNotepadWindow MoveNotepadWindow (Move and resize the specified notepad window)
FNC_NotepadColour NotepadColour (Changes the text and background colour of the selected notepad window)
FNC_NotepadFont NotepadFont (Changes the font and style of the selected notepad window)
FNC_NotepadSaveMethod NotepadSaveMethod (Changes the save method for this notepad window)
FNC_ReplaceNotepad ReplaceNotepad (Replaces text in a notepad window)
FNC_SendToNotepad SendToNotepad (Creates a notepad and sends text to it)

(Help topic: function=SaveNotepad)

DOC_contents Documentation contents page