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