Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.56 KB  |  views: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. alias chr {
  2.   if ($1 == $null) {
  3.     set %key $$?="Key to find:"
  4.     echo -a The ascii value of %key is $asc(%key) $+ .
  5.     halt
  6.   }
  7.   if ($len($1) == 1) {
  8.     echo -a $+($chr(2),$chr(3),06,$1,$chr(3)) converted to: $+($chr(3),06,$asc($1),$chr(3),$chr(46))
  9.   }
  10.   if ($len($1) >= 2) {
  11.     set %a $1
  12.     var %c $null
  13.     var %i 1
  14.     while (%i <= $len($1)) {
  15.       set %b $mid($1,%i,1)
  16.       %c = %c $+ $+($chr(36),chr,$chr(40),$asc(%b),$chr(41),$chr(44))
  17.       inc %i
  18.     }
  19.     %c = $left(%c,-1)
  20.     .echo -a $+($chr(36),$chr(43),$chr(40),%c,$chr(41))
  21.   }
  22. }