This is just a simple little setup that allows you to do conversions from binary <--> text and hex <--> text.
alias bin {
var %return = $iif($isid, return, echo -ag)
;// Binary to Text
if ($regex($1, /([01]{8})/gSi)) %return $regsubex($1, /(\d{8})/gSi, $chr($base(\t, 2, 10)))
;// Text to Binary
else %return $regsubex($1, /(.)/gSi, $base($asc(\t), 10, 2, 8))
}
alias hex2txt $iif($isid, return, echo -ag) $regsubex($1, /([0-9A-F]{2})/gSi, $chr($base(\t, 16, 10)))
alias txt2hex $iif($isid, return, echo -ag) $regsubex($1, /(.)/gSi, $base($asc(\t), 10, 16, 2))
/bin This is an example returns:
010101000110100001101001011100110010000001101001011100110010000001100001011011100010000001100101011110000110000101101101011100000110110001100101
/bin 010101000110100001101001011100110010000001101001011100110010000001100001011011100010000001100101011110000110000101101101011100000110110001100101 returns:
This is an example
/txt2hex This is an example returns:
5468697320697320616E206578616D706C65
/hex2txt 5468697320697320616E206578616D706C65 returns:
This is an example
I actually am working on an RGB HEX converter like Hawkee mentioned using some of the stuff already available with mIRC.
Looks like I need overflow: hidden on these comments.