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..



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
A simple loop does it. try either this example, or more detailed one here.

Joined: Jan 2003
Posts: 30
R
Ameglian cow
Offline
Ameglian cow
R
Joined: Jan 2003
Posts: 30
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.



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Jan 2003
Posts: 94
S
Babel fish
Offline
Babel fish
S
Joined: Jan 2003
Posts: 94
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
 }
}


-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard