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

MUSHclient scripting

Description of MUSHclient world function: world.Transparency

Name Transparency
Type Method
Summary Sets the transparency of the main MUSHclient window under Windows XP
Prototype boolean Transparency(long Key, short Amount);

View list of data type meanings


Under Windows XP or later operating systems, you can make the MUSHclient window semi-transparent, so that the underlying windows "show through". Under Windows NT/2000/95/98/ME this function does nothing.

Key: specifies the transparency colour key to be used when composing the layered window. All pixels painted by the window in this color will be transparent. This is an RGB code, you can use ColourNameToRGB to convert a name to RGB.

If the key is -1 then there is no colour key.

Amount: the amount of transparency for other colours, in the range 0 to 255. If outside this range the number will be coerced into it.


Drawing transparent windows may slow down the program, as the operating system has to render to an off-screen bitmap and copy to the main window. This slow-down may not be obvious on fast PCs.

Note: Available in version 3.83 onwards.

VBscript example
Transparency -1, 127  ' Make everything 50% transparent
Transparency 0, 255   ' Black is transparent, everything else is full intensity
Lua example
Transparency (-1, 127) -- Make everything 50% transparent
Transparency (0, 255)  -- Black is transparent, everything else is full intensity
Transparency (ColourNameToRGB ("red"), 64)  -- Red is transparent, everything else is 25% transparent
Returns On success, returns true.
On failure, returns false (eg. under Windows 95).
Introduced in version 3.83

See also ...

Function Description
ColourNameToRGB Converts a named colour to a RGB colour code.

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


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.


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]