Added in v3.06


Syntax: #STYLE name definition
Related: #UNSTYLE

Creates a user-defined style that can be used with commands such as #CW #COLOR and #PCOL. Using a number instead of a name allows you to change certain system styles.

The definition of a style can contain several different keyword phrases, separated by commas. The following phrases are recognized:

fore:color sets the foreground text color
back:color sets the background color
font:name sets the font name
size:n sets the font size
italic makes the text italic
underlined makes the text underlined
bold makes the text bold
eolfilled background color fills until the end of line

Color values can be names (from %colorname) or #RRGGBB HTML colors.

When using a number instead of a style name, you can change the attributes of certain system styles. The following style numbers can be changed:

0 : The default session text
1 : The Information messages style
2 : The Command echo style
3 : The Timestamp style
4 : The URL style

STYLE examples

#STYLE MyStyle fore:white,back:blue,italic
#TRIGGER {Status:} {#COLOR MyStyle}
Creates a new style called "MyStyle" with white italic text on a blue background. The trigger uses this style to color any line containing "Status:" with this new style. This allows you to change the color style in the future without needing to edit the trigger.

#STYLE 0 back:red;#WAIT 100;#STYLE 0 back:black

Causes the screen background to flash red for 100ms.

Add comment

Login or register to post comments