Project

General

Profile

Formatting text » History » Version 24

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