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

MUSHclient scripting

Description of MUSHclient world function: world.BoldColour


Name BoldColour
Type Property
Summary Gets/sets the RGB colour for one of the 8 ANSI bold colours
Prototype long BoldColour(short WhichColour); void BoldColour(short WhichColour, long nNewValue);

View list of data type meanings

Description

You can use this property to get or set the RGB colours used for the 8 ANSI bold colours. You must specify *which* colour you want to get/set, in the range 1 to 8, as follows:

black = 1
red = 2
green = 3
yellow = 4
blue = 5
magenta = 6
cyan = 7
white = 8


If you are setting the colour you must specify an RGB value. Some pre-defined values are available in VBscript, see below.

Constant Value Description
-------------------------------
vbBlack &h00 Black
vbRed &hFF Red
vbGreen &hFF00 Green
vbYellow &hFFFF Yellow
vbBlue &hFF0000 Blue
vbMagenta &hFF00FF Magenta
vbCyan &hFFFF00 Cyan
vbWhite &hFFFFFF White

In JScript you will need to use the RGB values, for example Magenta would be: 0xFF00FF.

You should be cautious doing frequent colour changes, because what happens is that you are changing the *palette* colour. What this means in practice is that if you change (say) the white colour (colour 8) then when new text appears on the screen it will be drawn in the new colour, however existing text will stay the old colour *until* it is redrawn (eg. is covered by a dialog box). This may lead to patchy bits of different colour on the screen.

You can have different colours on the screen (at the same time) by using the 16 custom colours, but only 16 different colours can be visible at once.

You can force a redraw of the whole world's window(s) by using the "Redraw" method.

See also NormalColour.

VBscript example
world.note world.boldcolour (2) 
world.boldcolour (2) = vbRed  
world.redraw   ' redraw screen
Jscript example
world.Note(world.boldcolour(2));  
world.boldcolour(2) = 0xFF; 
world.redraw();   // redraw screen
PerlScript example
$world->Note($world->boldcolour(2));
Python example
world.Note(world.boldcolour(2))
Lua example
Note (GetBoldColour (2))  
SetBoldColour (2, 254) 
Redraw()   -- redraw screen
Lua notes
Lua implements this as two functions:

GetBoldColour - gets the bold colour
SetBoldColour - sets the bold colour
Returns This is a property. You can use it to find the current bold colour.

See also ...

Function Description
NormalColour Gets/sets the RGB colour for one of the 8 ANSI normal colours
Redraw Schedules a redraw for all windows for this world

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]