Guest LAS Posted April 9, 2005 Report Share Posted April 9, 2005 So far my friend.. she wanted a input code that changes the colors for the first letter in every word and the rest of the word would be a diffent color. Well I tryed a few months before to get help here.. and didnt work out so well. Anywas I found out a way, only one problem. The code removes the same chrs as the first letter in the word sense I had to use $remove so that I can remove the first letter. I just woundern if anyone here knows how to help me. ins { %x = 1 var %in = $remove($1-,$chr(32)) while (%x <= $len(%in)) { var %in.p = $gettok($1-,%x,32) var %in.n = $left(%in.p,1) var %in.n2 = %in.n2 13 $+ %in.n $+ 10 $+ $remove(%in.p,%in.n) .inc %x } return %in.n2 } It maybe not the best code in the world. But it does work up to the point of removing the same chrs as the first letter. Example: Test Anywas any help would be nice... sense I cant figure out how to make this stop that.. Link to comment Share on other sites More sharing options...
us3rX Posted April 18, 2005 Report Share Posted April 18, 2005 Try this... on *:Input:#:{ if (/* !iswm $1) { set %blah.aa $1- set %blah.bb 1 set %blah.cc $numtok(%blah.aa,32) while (%blah.bb <= %blah.cc) { set %blah.msg %blah.msg 04 $+ $left($gettok(%blah.aa,%blah.bb,32),1) $+ 09 $+ $right($gettok(%blah.aa,%blah.bb,32),$calc($len($gettok(%blah.aa,%blah.bb,32)) - 1)) inc %blah.bb } msg $chan %blah.msg haltdef unset %blah.* } } I dont like using "set" but var wasnt working lol, i hope this is what you were after, just change the color numbers on the %blah.msg(09 and 04), you could also make a group to control it If you have any problems or other questions email me: us3rX [at] killanet [dot] net and let me know... i dont check this board very often us3rX Edit: sorry if any typos, i am tired as hell, lol Link to comment Share on other sites More sharing options...
The Gate Keeper Posted April 18, 2005 Report Share Posted April 18, 2005 you could try this, even though he said var wasn't working, on *:Input:#:{ if (/* !iswm $1) { var %blah.aa = $1- , %blah.bb = 1 , %blah.cc = $numtok(%blah.aa,32) while (%blah.bb <= %blah.cc) { set %blah.msg %blah.msg 04 $+ $left($gettok(%blah.aa,%blah.bb,32),1) $+ 09 $+ $right($gettok(%blah.aa,%blah.bb,32),$calc($len($gettok(%blah.aa,%blah.bb,32)) - 1)) inc %blah.bb } msg $chan %blah.msg haltdef } } Link to comment Share on other sites More sharing options...
Guest LAS Posted April 18, 2005 Report Share Posted April 18, 2005 Thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now