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

MUSHclient scripting

Description of MUSHclient world function: world.GetNotepadList


Name GetNotepadList
Type Method
Summary Gets the list of open notepads - returning their titles
Prototype VARIANT GetNotepadList(boolean All);

View list of data type meanings

Description

Returns a variant array which is a list of all open notepad windows.

If more than one notepad has the same title you may get duplicates.

If the argument (All) is true, then all notepad windows for the MUSHclient application are returned.

If the argument is false, then only "related" notepads for the current world are returned. Related notepads are those created from the world (eg. by AppendToNotepad), and are not ones manually created (eg. by the player).

Note that most notepad-related functions only apply to related notepads - that is, ones that "belong" to the world calling them.


Note: Available in version 4.08 onwards.


VBscript example
for each name in world.GetNotepadList
  world.Note name
next
Jscript example
notepadlist = new VBArray(world.GetNotepadList()).toArray();

if (notepadlist )  // if not empty
 for (i = 0; i < notepadlist.length; i++)
   world.note(notepadlist [i]);
PerlScript example
foreach $item (Win32::OLE::in ($world->GetNotepadList))
 {
 $world->note($item);
 }
Python example
notepadlist = world.GetNotepadList
if (notepadlist):
  for w in notepadlist : world.Note (w)
Lua example
for k, v in pairs (GetNotepadList()) do 
  Note (v) 
end
Lua notes
The argument "All" is optional, and defaults to false.
Returns If there are no notepads open then the return value is empty. Use "IsEmpty" to test for this possibility.

Otherwise, it returns a variant array containing the titles of all the notepads. Use "ubound" to find the number of notepads in the list.
Introduced in version 4.08

See also ...

Function Description
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
GetNotepadText Gets the text from a notepad window
ReplaceNotepad Replaces text in a notepad window
SaveNotepad Saves a notepad window to disk
SendToNotepad Creates a notepad and sends text to it

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]