NotepadSaveMethod
Script function

world.NotepadSaveMethod

DOC_scripting Read about scripting

Type

Method

Summary

Changes the save method for this notepad window

Prototype

boolean NotepadSaveMethod(BSTR Title, short Method);

DOC_data_types View list of 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.




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_ReplaceNotepad ReplaceNotepad (Replaces text in a notepad window)
FNC_SaveNotepad SaveNotepad (Saves a notepad window to disk)
FNC_SendToNotepad SendToNotepad (Creates a notepad and sends text to it)

(Help topic: function=NotepadSaveMethod)

DOC_contents Documentation contents page