|
Joined: Dec 2002
Posts: 174
Vogon poet
|
OP
Vogon poet
Joined: Dec 2002
Posts: 174 |
whats the $chr for |
im writing a script to ignore |
whats the $chr for | ?
|
|
|
|
Joined: Dec 2002
Posts: 417
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 417 |
thry this $chr(124) now if you want to learn more about what stands for what in ascii check out http://www.asciitable.com/
Intelligence: It's better to ask a stupid question, then to prove it by not asking....
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
to find out $chr numbers u can also type //echo -a $asc(LETTER)
it should give u a numeric output of the key u put in the ( ) example //echo -a $asc(|) returns 124
just figured id help u find out how to find them numbers out easier for future reference
D3m0nnet.com
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
alias asciitable { /window @ascii /aline $color(info) @ascii Ascii: $chr(9) Value: /aline $color(info) @ascii $str(-, 25) /set -u0 %ascii 0 while (%ascii <= 255) { /unset %info if (%ascii == 0) /set -u0 %info $+($,NULL) else if (%ascii == 2) /set -u0 %info BOLD (Ctrl+B) else if (%ascii == 3) /set -u0 %info 12C4OL8OR (Ctrl+K) else if (%ascii == 13) /set -u0 %info Enter/Return else if (%ascii == 15) /set -u0 %info PLAIN (Ctrl+O) else if (%ascii == 22) /set -u0 %info REVERSE (Ctrl+R) else if (%ascii == 27) /set -u0 %info Escape else if (%ascii == 31) /set -u0 %info UNDERLINE (Ctrl+U) else if (%ascii == 32) /set -u0 %info (Space) else if (%ascii == 160) /set -u0 %info (Hard Space) /aline $color(info) @ascii %ascii $chr(9) $+($chr(%ascii),) $chr(9) %info /inc -u0 %ascii } /aline $color(info) @ascii $str(-, 25) /aline $color(info) @ascii Ascii: $chr(9) Value: }
paste in remotes, and simply type /asciitable
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
damn thats nice i like that ty
D3m0nnet.com
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
lol--i liked it so much while i was writing it for them, i kept it myself--lmfao
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
hey its nice to find $chr numbers quickly and i like it better than my suggestion ..... if u dont mind id like to use it just for me to run scripts tests ..... it wouldnt ever end up in a released script if it did id give u full credit on it
D3m0nnet.com
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
heh--go for it >:D Afterall, thats what its written for, for people to use--not look at well, amybe to look at too, but only 0% [||---] 100% much
-KingTomato
|
|
|
|
Joined: Mar 2003
Posts: 272
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 272 |
/Chrs {
if ($1 == list) || ($1 == $null) {
var %chr = 1
window @Chr 1 50 120 700
while (%chr <= 255) { echo $iif($pair(%chr),4,11)) @chr %chr is $chr(%chr) | inc %chr }
}
if ($1 isnum) && ($1 <= 255) {
echo -a * The ASCII code for " $+ $1 $+ " is $chr($1)
}
}
/Ascii {
if ($1 == list) || ($1 == $null) {
var %asc = 1
window @asc 1 50 120 700
while (%asc <= 255) { .echo $iif($pair($asc($chr(%asc))),7,11)) @Asc $chr(%asc) is $asc($chr(%asc)) | inc %asc }
}
if ($1 !isnum) && ($asc($1)) {
echo -a * ASCII $1 returns $asc($1)
}
}
pair {
if ($gettok($calc($1 / 2),2,46) == 5) { return $false }
else { return $true }
} Syntax: /chrs list - lists all $chr /ascii list - lists all $asc /ascii <chr> - converts <char> into ascii number /chrs <ascii> - convers <ascii> into character Not that KT's wasn't good, but i just though i'd share my own version of it. You can get single characters with it, which is very useful. That goes in aliases, of course.
- cF Dedicated helper for rent.
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
umm... /ascii <char> == $asc(<char>) /chrs <char> == $chr(<char>)
-KingTomato
|
|
|
|
Joined: Mar 2003
Posts: 272
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 272 |
- cF Dedicated helper for rent.
|
|
|
|
Joined: Apr 2003
Posts: 414
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 414 |
//set -u60 %Temp | //echo -a $asc(%Temp) Easy to use
|
|
|
|
Joined: Apr 2003
Posts: 414
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 414 |
//echo $asc(|) work fine .. But for $ % ( ) .. other not work .. Put in the var .. And asc it ..
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 426 |
alias gchr { var %chr = $1 echo -a $asc(%chr) }
use that and you won't need to worry about setting any variables.
-------- mIRC - fun for all the family (except grandma and grandpa)
|
|
|
|
|