mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
Is there like a list out there, that tells what every $chr character is..

$chr(1) =
$chr(2) =
$chr(3) =

etc..

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
A simple loop does it. try either this example, or more detailed one here.

R
Rooster74
Rooster74
R
Try this: AsciiTable.com
Just take and use the numbers only from the HTML column.

Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
thanks rooster, thats exactaly what im looking for.

S
Sabby
Sabby
S
and you can find out there alt value by this (what i mean is like $chr(167) = alt + 0167)

Code:
alias altlist {
 var %i = 1
 while (%i <= 255) {
  echo -a $+(alt+,$str(0,$calc(4- $len(%i))),%i) = $chr(%i)
  inc %i
 }
}

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
On a sidenote, you can replace $str(0,$calc([color:red]4- $len(%i)) $+ %i[/color] with $base(%i,10,10,[color:red]4)[/color]. $base is not used here for base conversion (inbase and outbase are both 10) but we make use of the [zeropad] parameter, which does exactly what you want; prefixes the input number with enough 0's so that the total length of the output is equal to [zeropad] (in this example 4).


Link Copied to Clipboard