Project

General

Profile

Formatting text » History » Version 25

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