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

Bookmark

Script function

world.Bookmark

Read about scripting

Type

Method

Summary

Sets of clears a bookmark on the nominated line

Prototype

void Bookmark(long LineNumber, BOOL Set);

View list of data type meanings

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.


Available in MUSHclient 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.


Return value

None.


See Also ...

Function

(GetLinesInBufferCount) Returns the number of lines in the output window

(Help topic: function=Bookmark)

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]