Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.Bookmark


Name Bookmark
Type Method
Summary Sets of clears a bookmark on the nominated line
Prototype void Bookmark(long LineNumber, BOOL Set);
Description

Sets or clears a bookmark on any line in the output buffer (window).

The line number can be from 1 (the first line) to the number of lines in the output window. You can use "world.GetLinesInBufferCount" to find how many lines are currently in the output window. This number is different from the sequential number of the line since the world opened.

Note that when the buffer fills up lines are discarded in batches of 100, so the last line will probably not be 5000, even if your buffer size is 5000 and you have been connected for a while. It is likely to be in the range 4900 to 4999.

If the argument "Set" is true a bookmark is set, otherwise it is cleared.

Bookmarks do not consume any extra memory (they are a flag in the existing memory allocated for a line), and you can have as many bookmarks as there are lines. Inside the client the "go to bookmark" menu operation (Ctrl+B) can be used to navigate through bookmarked lines.


Note: Available in version 4.83 onwards.


Lua example
-- bookmark the most recently-received line
Bookmark (GetLinesInBufferCount (), true)
Lua notes
The Set argument is optional. If omitted it defaults to true.
Returns None.
Introduced in version 4.83

See also ...

Function Description
GetLinesInBufferCount Returns the number of lines in the output window

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]

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