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

NotepadSaveMethod

Script function

world.NotepadSaveMethod

Read about scripting

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.


Available in MUSHclient version 3.76 onwards.



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

Notepad

Functions

(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
(MoveNotepadWindow) Move and resize the specified notepad window
(NotepadColour) Changes the text and background colour of the selected notepad window
(NotepadFont) Changes the font and style of the selected notepad window
(NotepadReadOnly) Make a selected notepad window read-only
(ReplaceNotepad) Replaces text in a notepad window
(SaveNotepad) Saves a notepad window to disk
(SendToNotepad) Creates a notepad and sends text to it

(Help topic: function=NotepadSaveMethod)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

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]