[Home] [Downloads] [Search] [Help/forum]

MUSHclient scripting

Description of MUSHclient world function: world.NotepadSaveMethod


Name NotepadSaveMethod
Type Method
Summary Changes the save method for this notepad window
Prototype boolean NotepadSaveMethod(BSTR Title, short Method);

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.


Note: Available in version 3.76 onwards.


VBscript example
NotepadSaveMethod "test", 1
Jscript example
NotepadSaveMethod ("test", 1);
Lua example
NotepadSaveMethod ("test", 1)
Returns 0 = Could not do it (eg. that notepad does not exist, or option out of range)
1 = Option changed OK.
Introduced in version 3.76

See also ...

Function Description
GetNotepadList Gets the list of open notepads - returning their titles
NotepadReadOnly Make a selected notepad window read-only
SaveNotepad Saves a notepad window to disk

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]