Difference between revisions of "Control Codes"
From Scriptwiki
m (added page) |
m (changed those $+'s a bit) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
$chr(03) (ctrl+k) = color | $chr(03) (ctrl+k) = color | ||
$chr(15) (ctrl+o) = normal (turn off all control codes) | $chr(15) (ctrl+o) = normal (turn off all control codes) | ||
− | $chr( | + | $chr(22) (ctrl+r) = reversed foreground/background color |
− | $chr(31) (ctrl+ | + | $chr(31) (ctrl+u) = underline |
Examples: | Examples: | ||
− | //echo -a $chr( | + | //echo -a $chr(03) $+ 04 $+ Some $chr(02) $+ text $chr(03) $+ with $chr(31) $+ control $chr(15) $+ codes. |
− | At first, this will start control code for color ($chr(03)) with color 04, then add bold after the first word, end the color code (plain $chr(03) without any numbers after it), then start underline for the word "control", and end '''all''' control codes before word "codes". | + | At first, this will start control code for color ($chr(03)) with color 04, then add bold after the first word, end the color code (plain $chr(03) without any numbers after it), then start underline for the word "control", and end '''all''' control codes before word "codes".<br /> |
(i used those $+'s in there, so there will only be 1 space between words) | (i used those $+'s in there, so there will only be 1 space between words) | ||
+ | |||
+ | [[Category:Remote]] |
Latest revision as of 14:23, 13 June 2007
Control codes are used to modify the appearence of text (colors, bold, underline, inverse color)
$chr(02) (ctrl+b) = bold $chr(03) (ctrl+k) = color $chr(15) (ctrl+o) = normal (turn off all control codes) $chr(22) (ctrl+r) = reversed foreground/background color $chr(31) (ctrl+u) = underline
Examples:
//echo -a $chr(03) $+ 04 $+ Some $chr(02) $+ text $chr(03) $+ with $chr(31) $+ control $chr(15) $+ codes.
At first, this will start control code for color ($chr(03)) with color 04, then add bold after the first word, end the color code (plain $chr(03) without any numbers after it), then start underline for the word "control", and end all control codes before word "codes".
(i used those $+'s in there, so there will only be 1 space between words)