mIRC Snippets
Name:$text
Description: This snippets does neat things with your text. It allows you to seperate the text,reverse the text,upper and lower case each word and randomize text colors.
Code below...
>
;********************************
;EXAMPLES BELOW:
;REVERSE TEXT: //echo -a $text(this is a reverse text).rev
;SEPARATE TEXT: //echo -a $text(this text is all separate).sep
;UPPER/LOWER CASE TEXT: //echo -a $text(this is upper and lower case text).ul
;RANDOM COLORS TEXT: //echo -a $text(this is all random colors).rc
;********************************
alias text {
if ($prop == rev) {
var %i 1,%l = $len($1-),%t
while (%l >= %i) {
%t = $+(%t,$iif($mid($1-,%l,1) = $chr(32),$chr(32) $mid($1-,%l,1),$mid($1-,%l,1)))
dec %l
}
return %t
}
if ($prop == sep) {
var %i 1,%l = $len($1-),%t
while (%i <= %l) {
%t = $+(%t,$chr(32),$mid($1-,%i,1))
inc %i
}
return %t
}
if ($prop == ul) {
var %i 1,%l = $len($1-),%t,%n = $iif($islower($left($1-,1)),l,u)
while (%i <= %l) {
if ($mid($1-,%i,1) == $chr(32)) { %t = $+(%t,$chr(32) $iif(%n = l,$upper($mid($1-,%i,1)),$lower($mid($1-,%i,1)))) }
else { %t = $+(%t,$iif(%n = l,$upper($mid($1-,%i,1)),$lower($mid($1-,%i,1)))) }
%n = $iif(%n = l,u,l)
inc %i
}
return %t
}
if ($prop == rc) {
var %i 1,%l = $len($1-),%t
while (%i <= %l) {
if ($mid($1-,%i,1) == $chr(32)) { %t = $+(%t,$chr(32) $+(,$rand(0,15),$mid($1-,%i,1))) }
else { %t = $+(%t,$+(,$rand(0,15),$mid($1-,%i,1))) }
inc %i
}
return %t
}
}
<
;EXAMPLES BELOW:
;REVERSE TEXT: //echo -a $text(this is a reverse text).rev
;SEPARATE TEXT: //echo -a $text(this text is all separate).sep
;UPPER/LOWER CASE TEXT: //echo -a $text(this is upper and lower case text).ul
;RANDOM COLORS TEXT: //echo -a $text(this is all random colors).rc
;********************************
alias text {
if ($prop == rev) {
var %i 1,%l = $len($1-),%t
while (%l >= %i) {
%t = $+(%t,$iif($mid($1-,%l,1) = $chr(32),$chr(32) $mid($1-,%l,1),$mid($1-,%l,1)))
dec %l
}
return %t
}
if ($prop == sep) {
var %i 1,%l = $len($1-),%t
while (%i <= %l) {
%t = $+(%t,$chr(32),$mid($1-,%i,1))
inc %i
}
return %t
}
if ($prop == ul) {
var %i 1,%l = $len($1-),%t,%n = $iif($islower($left($1-,1)),l,u)
while (%i <= %l) {
if ($mid($1-,%i,1) == $chr(32)) { %t = $+(%t,$chr(32) $iif(%n = l,$upper($mid($1-,%i,1)),$lower($mid($1-,%i,1)))) }
else { %t = $+(%t,$iif(%n = l,$upper($mid($1-,%i,1)),$lower($mid($1-,%i,1)))) }
%n = $iif(%n = l,u,l)
inc %i
}
return %t
}
if ($prop == rc) {
var %i 1,%l = $len($1-),%t
while (%i <= %l) {
if ($mid($1-,%i,1) == $chr(32)) { %t = $+(%t,$chr(32) $+(,$rand(0,15),$mid($1-,%i,1))) }
else { %t = $+(%t,$+(,$rand(0,15),$mid($1-,%i,1))) }
inc %i
}
return %t
}
}
<