Project

General

Profile

Formatting text » History » Version 26

Per Amundsen, 05/17/2015 03:11 AM

1 1 Per Amundsen
{{>toc}}
2
3
h1. Formatting text
4
5
AdiIRC supports control codes for formatting text.
6
7 12 Per Amundsen
All control codes can be combined to format the same block.
8
9 2 Per Amundsen
h1. Colorchar
10
11 4 Per Amundsen
Colors blocks of text.
12
13 7 Per Amundsen
Ascii character [[$chr]](3)
14 4 Per Amundsen
15
Ctrl + K can be used in editbox to type this character.
16
17 15 Per Amundsen
The character can be followed by 1-2 digits that represent the color number.
18 1 Per Amundsen
19 7 Per Amundsen
By specifying a comma after the digits, you can add a 1-2 digit background color as well.
20
21
The default colors can be changed in Options -> Colors -> mIRC Colors.
22
23 8 Per Amundsen
A second color character can be used to stop the coloring and revert to default line color.
24
25 6 Per Amundsen
*Example*
26
<pre>
27
; Prints the text 'Hello World' with color 4 which is red by default.
28
//echo -ag $chr(3) $+ 3 Hello world
29 25 Per Amundsen
</pre>
30 6 Per Amundsen
31 25 Per Amundsen
Result: %{color:#FF0000}Hello World%
32
33
<pre>
34 13 Per Amundsen
; Prints the text 'Hello' with color 4 which is red by default and 'world' is the default line color.
35 8 Per Amundsen
//echo -ag $chr(3) $+ 3 Hello $+ $chr(3) $+ world
36 26 Per Amundsen
</pre>
37 8 Per Amundsen
38 25 Per Amundsen
Result: %{color:#FF0000}Hello% world
39
40
</pre>
41 6 Per Amundsen
; Prints the text 'Hello World' with color 4 which is red by default and background color 12 which is blue by default.
42
//echo -ag $chr(3) $+ 3,12 Hello world
43
</pre>
44 25 Per Amundsen
45
Result: %{background:#0000CC;color:#FF0000}Hello world%
46 1 Per Amundsen
47 2 Per Amundsen
h1. Boldchar 
48 1 Per Amundsen
49 7 Per Amundsen
Makes the block use a *bold* font.
50 1 Per Amundsen
51 7 Per Amundsen
Ascii character [[$chr]](2)
52
53
Ctrl + B can be used in editbox to type this character.
54
55 8 Per Amundsen
*Example*
56
<pre>
57
//echo -ag $chr(2) this text is bold $chr(2) this text is not
58
</pre>
59
60 1 Per Amundsen
h1. Italicchar 
61
62 7 Per Amundsen
Makes the block use a _italic_ font.
63 1 Per Amundsen
64 7 Per Amundsen
Ascii character [[$chr]](29)
65
66
Ctrl + I can be used in editbox to type this character.
67
68 9 Per Amundsen
*Example*
69 8 Per Amundsen
<pre>
70 11 Per Amundsen
//echo -ag $chr(2) this text is italic $chr(29) this text is not
71 8 Per Amundsen
</pre>
72
73 1 Per Amundsen
h1. Underlinechar 
74
75 7 Per Amundsen
Makes the block use a +underline+ font.
76
77
Ascii character [[$chr]](31)
78
79 10 Per Amundsen
Ctrl + U can be used in editbox to type this character.
80 9 Per Amundsen
81 8 Per Amundsen
*Example*
82
<pre>
83 11 Per Amundsen
//echo -ag $chr(2) this text is underline $chr(31) this text is not
84 8 Per Amundsen
</pre>
85 2 Per Amundsen
86
h1. Stopchar 
87 1 Per Amundsen
88 10 Per Amundsen
Stops all color and font formatting.
89
90
Ascii character [[$chr]](15)
91 1 Per Amundsen
92
Ctrl + O  can be used in editbox to type this character.
93 11 Per Amundsen
94
*Example*
95
96 1 Per Amundsen
<pre>
97 11 Per Amundsen
//echo -ag $chr(3) $+ 4 $+ $chr(2) this text is bold and colored $chr(15) this text is not
98 1 Per Amundsen
</pre>
99
100 13 Per Amundsen
h1. Alternative colorchar 
101 1 Per Amundsen
102 13 Per Amundsen
AdiIRC has an alterinative color character as of 1.9.7, this is AdiIRC only.
103
104
Unicode character [[$chr]](61442)
105
106
Works the same as colorchar, except it takes a hexcolor format RRGGBB same as html colors.
107
108 14 Per Amundsen
A second color character can be used to stop the coloring and revert to default line color.
109
110 13 Per Amundsen
*Example*
111
<pre>
112
; Prints the text 'Hello World' with hex color FF0000 which is red.
113
//echo -ag $chr(61442) $+ FF0000 Hello world
114 20 Per Amundsen
</pre>
115
116 21 Per Amundsen
Result: %{color:#FF0000}Hello World%
117 13 Per Amundsen
118 22 Per Amundsen
<pre>
119 13 Per Amundsen
; Prints the text 'Hello' with with hex color FF0000 which is red and 'world' is the default line color.
120 16 Per Amundsen
//echo -ag $chr(61442) $+ FF0000 Hello $+ $chr(61442) $+ world
121 22 Per Amundsen
</pre>
122 13 Per Amundsen
123 22 Per Amundsen
Result: %{color:#FF0000}Hello% world
124
125
<pre>
126 13 Per Amundsen
; Prints the text 'Hello World' with hex color FF0000 which is red and hex background color 0000CC which is bluet.
127
//echo -ag $chr(61442) $+ FF0000,0000CC Hello world
128
</pre>
129 22 Per Amundsen
130 24 Per Amundsen
Result: %{background:#0000CC;color:#FF0000}Hello world%