mIRC Home    About    Download    Register    News    Help

Print Thread
#136261 25/11/05 07:03 AM
Joined: Dec 2002
Posts: 79
F
Fantas Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Dec 2002
Posts: 79
this is what i got to break up a 4 letter word and return the $asc value but is there an easier way to do this and make it unlimited letters?
alias ccode {
var %a = $left($gettok($1,1,32), -3)
echo -a $asc(%a)
var %b = $mid($1,2,1)
echo -a $asc(%b)
var %c = $mid($1,3,1)
echo -a $asc(%c)
var %d = $right($gettok($1,1,32), -3)
echo -a $asc(%d)
}

#136262 25/11/05 07:15 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Do you mean something like this?

Code:
alias ccode {
  var %x = 1, %y = $len($left($gettok($1,1,32), -3))
  while (%x <= %y) {
    echo -a $asc($mid($1,%x,1))
    inc %x
  }
}


-Andy

#136263 25/11/05 07:23 AM
Joined: Dec 2002
Posts: 79
F
Fantas Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Dec 2002
Posts: 79
no like if i type /ccode bot it would say
b == $chr(98)
o == $chr(111)
t == $chr(116)

how you Like Canada Slade ? learned to say Eh yet?

Last edited by Fantas; 25/11/05 07:25 AM.
#136264 25/11/05 07:37 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
alias ccode {
  var %x = 1
  while (%x <= $len($1)) {
    var %char = $mid($1,%x,1)
    echo -a %char == $+($,chr,$chr(40),$asc(%char),$chr(41))
    inc %x
  }
}


B == $chr(66)
o == $chr(111)
t == $chr(116)

Canada's cool, the folk are friendly which is good. I can't think of one thing that I say Canadian it's still british. Although I should because I went to a restaurant and orded a plate of chips, ya you guessed it I got a bag of doritos so... There was some sort of miscommunication or something.. mad

-Andy

#136265 25/11/05 07:41 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 alias ccode {
var %a = 1
while %a <= $len($1-)  {
var %b = $asc($mid($1-,%a,1))
echo -a $mid($1-,%,1) == $!chr( $+ %b $+)
inc %a
}
}
 

#136266 25/11/05 07:42 AM
Joined: Dec 2002
Posts: 79
F
Fantas Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Dec 2002
Posts: 79
Thanks Man

#136267 25/11/05 07:54 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
lol...glad you're enjoying Canada, Slade. Next time, ask for fries...which is what you probably meant for your order in the restaurant.

#136268 25/11/05 08:04 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well they say fries in the UK too but it's mainly said in McDonalds, Burger King. I've learned to let the girlfriend order my food she's learned to take money from my wallet to pay..

-Andy

#136269 25/11/05 01:24 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
/ccode this is a test

Code:
alias ccode {
  bset -t &bin 1 $$1-
  tokenize 32 $bvar(&bin,1-)
  scon -r echo -a $!chr( $* ) = $*
}


Gone.

Link Copied to Clipboard