| Parsed for bracket errors and indented: | |
1 2 3 4 5 6 7 8 9 10 |
alias h2t { var %x = 1 var %text = $replace($1-,\x,$chr(255)) while (%x <= $numtok(%text,255)) { %check = $chr($base($gettok($replace($1-,\x,$chr(255)),%x,255),16,10)) var %hex = %hex $iif(%check != $chr(32),$+) %check inc %x } echo -a %hex } |