Formatting text » History » Version 75
Per Amundsen, 06/28/2020 07:37 PM
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 | 54 | Per Amundsen | Most IRC clients supports these control codes, so they can used to send formatted text to others as well as formatting incoming [[Scripting_Events|text events]] using the [[/echo]] command. |
10 | 42 | Per Amundsen | |
11 | 72 | Per Amundsen | h1. Color Character |
12 | 2 | Per Amundsen | |
13 | 4 | Per Amundsen | Colors blocks of text. |
14 | |||
15 | 56 | Per Amundsen | "ASCII":http://www.asciitable.com/ character [[$chr]](3) |
16 | 4 | Per Amundsen | |
17 | 60 | Per Amundsen | %(key)CTRL% + %(key)K% can be used in [[Editbox Control|Editbox]] to type this character. |
18 | 4 | Per Amundsen | |
19 | 15 | Per Amundsen | The character can be followed by 1-2 digits that represent the color number. |
20 | 1 | Per Amundsen | |
21 | 7 | Per Amundsen | By specifying a comma after the digits, you can add a 1-2 digit background color as well. |
22 | |||
23 | 44 | Per Amundsen | The default colors can be changed in [[Options_Dialog|Options]] -> [[Colors_Options|Colors]] -> [[Colors_Options#mIRC-Colors|mIRC Colors]]. |
24 | 7 | Per Amundsen | |
25 | 8 | Per Amundsen | A second color character can be used to stop the coloring and revert to default line color. |
26 | |||
27 | 63 | Per Amundsen | _See also [[Extra Colors]]._ |
28 | 62 | Per Amundsen | |
29 | 6 | Per Amundsen | *Example* |
30 | <pre> |
||
31 | ; Prints the text 'Hello World' with color 4 which is red by default. |
||
32 | //echo -ag $chr(3) $+ 3 Hello world |
||
33 | 25 | Per Amundsen | </pre> |
34 | 6 | Per Amundsen | |
35 | 25 | Per Amundsen | Result: %{color:#FF0000}Hello World% |
36 | |||
37 | <pre> |
||
38 | 13 | Per Amundsen | ; Prints the text 'Hello' with color 4 which is red by default and 'world' is the default line color. |
39 | 36 | Per Amundsen | //echo -ag $chr(3) $+ 3 Hello $+ $chr(3) world |
40 | 26 | Per Amundsen | </pre> |
41 | 8 | Per Amundsen | |
42 | 25 | Per Amundsen | Result: %{color:#FF0000}Hello% world |
43 | |||
44 | 34 | Per Amundsen | <pre> |
45 | 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. |
46 | //echo -ag $chr(3) $+ 3,12 Hello world |
||
47 | </pre> |
||
48 | 25 | Per Amundsen | |
49 | Result: %{background:#0000CC;color:#FF0000}Hello world% |
||
50 | 1 | Per Amundsen | |
51 | 72 | Per Amundsen | h1. Bold Character |
52 | 1 | Per Amundsen | |
53 | 7 | Per Amundsen | Makes the block use a *bold* font. |
54 | 1 | Per Amundsen | |
55 | 56 | Per Amundsen | "ASCII":http://www.asciitable.com/ character [[$chr]](2) |
56 | 7 | Per Amundsen | |
57 | 60 | Per Amundsen | %(key)CTRL% + %(key)B% can be used in [[Editbox Control|Editbox]] to type this character. |
58 | 7 | Per Amundsen | |
59 | 8 | Per Amundsen | *Example* |
60 | <pre> |
||
61 | //echo -ag $chr(2) this text is bold $chr(2) this text is not |
||
62 | </pre> |
||
63 | |||
64 | 27 | Per Amundsen | Result: *this text is bold* this text is not |
65 | |||
66 | 72 | Per Amundsen | h1. Italic Character |
67 | 1 | Per Amundsen | |
68 | 7 | Per Amundsen | Makes the block use a _italic_ font. |
69 | 1 | Per Amundsen | |
70 | 56 | Per Amundsen | "ASCII":http://www.asciitable.com/ character [[$chr]](29) |
71 | 7 | Per Amundsen | |
72 | 60 | Per Amundsen | %(key)CTRL% + %(key)I% can be used in [[Editbox Control|Editbox]] to type this character. |
73 | 7 | Per Amundsen | |
74 | 9 | Per Amundsen | *Example* |
75 | 8 | Per Amundsen | <pre> |
76 | 38 | Per Amundsen | //echo -ag $chr(29) this text is italic $chr(29) this text is not |
77 | 8 | Per Amundsen | </pre> |
78 | |||
79 | 27 | Per Amundsen | Result: _this text is italic_ this text is not |
80 | |||
81 | 72 | Per Amundsen | h1. Underline Character |
82 | 1 | Per Amundsen | |
83 | 7 | Per Amundsen | Makes the block use a +underline+ font. |
84 | |||
85 | 56 | Per Amundsen | "ASCII":http://www.asciitable.com/ character [[$chr]](31) |
86 | 7 | Per Amundsen | |
87 | 60 | Per Amundsen | %(key)CTRL% + %(key)U% can be used in [[Editbox Control|Editbox]] to type this character. |
88 | 9 | Per Amundsen | |
89 | 8 | Per Amundsen | *Example* |
90 | <pre> |
||
91 | 38 | Per Amundsen | //echo -ag $chr(31) this text is underline $chr(31) this text is not |
92 | 8 | Per Amundsen | </pre> |
93 | 2 | Per Amundsen | |
94 | 27 | Per Amundsen | Result: +this text is underline+ this text is not |
95 | |||
96 | 72 | Per Amundsen | h1. Stop Character |
97 | 1 | Per Amundsen | |
98 | 10 | Per Amundsen | Stops all color and font formatting. |
99 | |||
100 | 56 | Per Amundsen | "ASCII":http://www.asciitable.com/ character [[$chr]](15) |
101 | 1 | Per Amundsen | |
102 | 60 | Per Amundsen | %(key)CTRL% + %(key)O% can be used in [[Editbox Control|Editbox]] to type this character. |
103 | 11 | Per Amundsen | |
104 | *Example* |
||
105 | |||
106 | 1 | Per Amundsen | <pre> |
107 | 11 | Per Amundsen | //echo -ag $chr(3) $+ 4 $+ $chr(2) this text is bold and colored $chr(15) this text is not |
108 | 1 | Per Amundsen | </pre> |
109 | 27 | Per Amundsen | |
110 | 1 | Per Amundsen | Result: *%{color:#FF0000}this text is bold and colored%* this text is not |
111 | |||
112 | 72 | Per Amundsen | h1. Alternative Color Character |
113 | 13 | Per Amundsen | |
114 | 66 | Per Amundsen | AdiIRC has an alternative color character [[$chr]](4) as of 1.9.7, this is AdiIRC only. |
115 | 13 | Per Amundsen | |
116 | 72 | Per Amundsen | Works the same as color character, except it takes a hexcolor format RRGGBB same as html colors. |
117 | 1 | Per Amundsen | |
118 | 13 | Per Amundsen | By specifying a comma after the hexcolor, you can add a second hexolor for setting the background color as well. |
119 | |||
120 | 45 | Per Amundsen | A normal color character can be used to stop the coloring and revert to default line color. |
121 | 59 | Per Amundsen | |
122 | 60 | Per Amundsen | %(key)CTRL% + %(key)SHIFT% + %(key)K% can be used in [[Editbox Control|Editbox]] to type this character. |
123 | 14 | Per Amundsen | |
124 | 1 | Per Amundsen | *Example* |
125 | 13 | Per Amundsen | <pre> |
126 | ; Prints the text 'Hello World' with hex color FF0000 which is red. |
||
127 | 64 | Per Amundsen | //echo -ag $chr(4) $+ FF0000 Hello world |
128 | 20 | Per Amundsen | </pre> |
129 | |||
130 | 1 | Per Amundsen | Result: %{color:#FF0000}Hello World% |
131 | 21 | Per Amundsen | |
132 | 22 | Per Amundsen | <pre> |
133 | 37 | Per Amundsen | ; Prints the text 'Hello' with hex color FF0000 which is red and 'world' is the default line color. |
134 | 64 | Per Amundsen | //echo -ag $chr(4) $+ FF0000 Hello $+ $chr(3) world |
135 | 22 | Per Amundsen | </pre> |
136 | 1 | Per Amundsen | |
137 | 13 | Per Amundsen | Result: %{color:#FF0000}Hello% world |
138 | 22 | Per Amundsen | |
139 | <pre> |
||
140 | 55 | Per Amundsen | ; Prints the text 'Hello World' with hex color FF0000 which is red and hex background color 0000CC which is blue. |
141 | 64 | Per Amundsen | //echo -ag $chr(4) $+ FF0000,0000CC Hello world |
142 | 13 | Per Amundsen | </pre> |
143 | 22 | Per Amundsen | |
144 | 24 | Per Amundsen | Result: %{background:#0000CC;color:#FF0000}Hello world% |
145 | 47 | Per Amundsen | |
146 | 73 | Per Amundsen | h1. Reverse Character |
147 | 61 | Per Amundsen | |
148 | 74 | Per Amundsen | Changes the text color to the background color and the background color to the *Normal* text color. |
149 | 61 | Per Amundsen | |
150 | *Example* |
||
151 | <pre> |
||
152 | //echo -ag This text is normal |
||
153 | </pre> |
||
154 | |||
155 | 1 | Per Amundsen | Result: Hello world |
156 | 61 | Per Amundsen | |
157 | *Example* |
||
158 | <pre> |
||
159 | //echo -ag $chr(22) $+ This text is reverse colored $+ $chr(22) |
||
160 | </pre> |
||
161 | |||
162 | Result: %{background:#000000;color:#FFFFFF}Hello world% |
||
163 | |||
164 | 75 | Per Amundsen | _By default the reverse character only reverses the message area background and *Normal* color, to reverse background/color based on the Color Characters instead, type [[/setoption]] Messages UseReverseColorCodes True, to disable type [[/setoption]] Messages UseReverseColorCodes False._ |
165 | 70 | Per Amundsen | |
166 | 47 | Per Amundsen | h1. In Options |
167 | 52 | Per Amundsen | |
168 | 58 | Per Amundsen | The control codes can also be used in many options such as [[Options_Dialog|Options]] -> [[Messages_Options|Messages]] -> [[Messages_Options#Timestamp|Timestamp]] / [[Messages_Options#Message-prefix-User|Message prefix User]]. |