world.NotepadSaveMethod

MUSHclient script function (Method) — introduced in version 3.76

Changes the save method for this notepad window

Prototype

boolean NotepadSaveMethod(BSTR Title, short Method);

Data type meanings

Description

This lets you change the save method for an open notepad window.

The first argument is the title of an existing notepad window. The second argument is one of the following 3 numbers:

0 - Use default method (same as if this function had not been called)
1 - Always offer to save this window if the contents have changed
2 - Never offer to save this window if the contents have changed

eg.

NotepadSaveMethod ("test", 1)

The following notepad window types normally close without offering to save:

Line Info
MXP debug (depending on MXP options)
Packet Debug
Plugin Info
XML comments
World Load Error

You could use this to force the saving of something like Packet Debug, or inhibit the saving of a notepad window you created yourself.

VBscript example

NotepadSaveMethod "test", 1

Jscript example

NotepadSaveMethod ("test", 1);

Lua example

NotepadSaveMethod ("test", 1)

Return value

0 = Could not do it (eg. that notepad does not exist, or option out of range)
1 = Option changed OK.

Related topic

Notepad

See also

FunctionDescription
GetNotepadListGets the list of open notepads - returning their titles
NotepadReadOnlyMake a selected notepad window read-only
SaveNotepadSaves a notepad window to disk