Project

General

Profile

Formatting text » History » Revision 82

Revision 81 (Per Amundsen, 09/23/2021 12:03 AM) → Revision 82/83 (Per Amundsen, 09/24/2021 09:14 PM)

{{>toc}} 

 h1. Formatting text 

 AdiIRC supports control codes for formatting text. 

 All control codes can be combined to format the same block. 

 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. 

 h1. Color Character 

 Colors blocks of text. 

 "ASCII":http://www.asciitable.com/ character [[$chr]](3) 

 %(key)CTRL% + %(key)K% can be used in [[Editbox Control|Editbox]] to type this character. 

 The character can be followed by 1-2 digits that represent the color number. 

 By specifying a comma after the digits, you can add a 1-2 digit background color as well. 

 The default colors can be changed in [[Options_Dialog|Options]] -> [[Colors_Options|Colors]] -> [[Colors_Options#mIRC-Colors|mIRC Colors]]. 

 A second color character can be used to stop the coloring and revert to default line color. 

 _See also [[Extra Colors]]._ 

 *Example* 
 <pre> 
 ; Prints the text 'Hello World' with color 4 which is red by default. 
 //echo -ag $chr(3) $+ 4 Hello world 
 </pre> 

 Result: %{color:#FF0000}Hello World% 

 <pre> 
 ; Prints the text 'Hello' with color 4 which is red by default and 'world' is the default line color. 
 //echo -ag $chr(3) $+ 4 Hello $+ $chr(3) world 
 </pre> 

 Result: %{color:#FF0000}Hello% world 

 <pre> 
 ; Prints the text 'Hello World' with color 4 which is red by default and background color 12 which is blue by default. 
 //echo -ag $chr(3) $+ 4,12 Hello world 
 </pre> 

 Result: %{background:#0000CC;color:#FF0000}Hello world% 

 h1. Bold Character 

 Makes the block use a *bold* font. 

 "ASCII":http://www.asciitable.com/ character [[$chr]](2) 

 %(key)CTRL% + %(key)B% can be used in [[Editbox Control|Editbox]] to type this character. 

 *Example* 
 <pre> 
 //echo -ag $chr(2) this text is bold $chr(2) this text is not 
 </pre> 

 Result: *this text is bold* this text is not 

 h1. Italic Character 

 Makes the block use a _italic_ font. 

 "ASCII":http://www.asciitable.com/ character [[$chr]](29) 

 %(key)CTRL% + %(key)I% can be used in [[Editbox Control|Editbox]] to type this character. 

 *Example* 
 <pre> 
 //echo -ag $chr(29) this text is italic $chr(29) this text is not 
 </pre> 

 Result: _this text is italic_ this text is not 

 h1. Underline Character 

 Makes the block use a +underline+ font. 

 "ASCII":http://www.asciitable.com/ character [[$chr]](31) 

 %(key)CTRL% + %(key)U% can be used in [[Editbox Control|Editbox]] to type this character. 

 *Example* 
 <pre> 
 //echo -ag $chr(31) this text is underline $chr(31) this text is not 
 </pre> 

 Result: +this text is underline+ this text is not 


 h1. Strikethrough Character 

 Makes the block use a + -strikethrough- font. 

 "ASCII":http://www.asciitable.com/ character [[$chr]](30) 

 A shortcut can be assigned in [[Options Dialog|Options]] -> [[Shortcuts_Options|Shortcuts]]. 

 *Example* 
 <pre> 
 //echo -ag $chr(30) this text is strikethrough $chr(30) this text is not 
 </pre> 

 Result: -this text is strikethrough- this text is not 

 h1. Stop Character 

 Stops all color and font formatting. 

 "ASCII":http://www.asciitable.com/ character [[$chr]](15) 

 %(key)CTRL% + %(key)O% can be used in [[Editbox Control|Editbox]] to type this character. 

 *Example* 

 <pre> 
 //echo -ag $chr(3) $+ 4 $+ $chr(2) this text is bold and colored $chr(15) this text is not 
 </pre> 

 Result: *%{color:#FF0000}this text is bold and colored%* this text is not 

 h1. Alternative Color Character 

 AdiIRC has an alternative color character [[$chr]](4) as of 1.9.7, this is AdiIRC only. 

 Works the same as color character, except it takes a hexcolor format RRGGBB same as html colors. 

 By specifying a comma after the hexcolor, you can add a second hexolor for setting the background color as well. 

 A normal color character can be used to stop the coloring and revert to default line color. 

 %(key)CTRL% + %(key)SHIFT% + %(key)K% can be used in [[Editbox Control|Editbox]] to type this character. 

 *Example* 
 <pre> 
 ; Prints the text 'Hello World' with hex color FF0000 which is red. 
 //echo -ag $chr(4) $+ FF0000 Hello world 
 </pre> 

 Result: %{color:#FF0000}Hello World% 

 <pre> 
 ; Prints the text 'Hello' with hex color FF0000 which is red and 'world' is the default line color. 
 //echo -ag $chr(4) $+ FF0000 Hello $+ $chr(3) world 
 </pre> 

 Result: %{color:#FF0000}Hello% world 

 <pre> 
 ; Prints the text 'Hello World' with hex color FF0000 which is red and hex background color 0000CC which is blue. 
 //echo -ag $chr(4) $+ FF0000,0000CC Hello world 
 </pre> 

 Result: %{background:#0000CC;color:#FF0000}Hello world% 

 h1. Reverse Character 

 Changes the text color to the background color and the background color to the *Normal* text color. 

 *Example* 
 <pre> 
 //echo -ag This text is normal 
 </pre> 

 Result: Hello world 

 *Example* 
 <pre> 
 //echo -ag $chr(22) $+ This text is reverse colored $+ $chr(22) 
 </pre> 

 Result: %{background:#000000;color:#FFFFFF}Hello world% 

 _By default the reverse character only reverses the [[TextArea Control|Text 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._ 

 h1. ANSI escape codes 

 As of 4.0 AdiIRC supports a limited set of "ANSI escape codes":https://en.wikipedia.org/wiki/ANSI_escape_code for coloring and formatting text of incoming messages or using the [[$ansi2mirc]] identifier. 

 h1. In Options 

 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]].