mIRC Home    About    Download    Register    News    Help

Print Thread
#46610 02/09/03 07:02 PM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
I want to add dots into a text
example:
I want to add dot
like: I.w.a.n.t.t.o.a.d.d.d.o.t
and I want to see an example of a text colourer script can anyone help me?

#46611 02/09/03 07:10 PM
Joined: Jan 2003
Posts: 249
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 249
Something along those lines

Code:
$add_dot(word) = w.o.r.d

alias add_dot {
 if ($1) {
  var %i = 2, %t = $left($1,1)
  while (%i <= $len($1)) {
   %t = $+(%t,.,$mid($1,%i,1))
   inc %i
  }
  return %t
 }
}

#46612 02/09/03 07:34 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Try this..
Code:
menu channel {
  Dots
  .On: {
    if ($group(#Dots).status == Off) { .enable #Dots | echo -a *** Dots have been turned on. }
    else { echo This group is already enabled. }
  }
  .Off: {
    if ($group(#Dots).status == On) { .disable #Dots | echo -a *** Dots have been turns off. }
    else { echo This group is already disabled. }
  }
}

#Dots off
on 1:INPUT:#: {
  var %x = $1-
  msg $chan $replace(%x,a,a.,b,b.,c,c.,d,d.,e,e.,f,f.,g,g.,h,h.,i,i.,j,j.,k,k.,l,l.,m,m.,n,n.,o,o.,p,p.,q,q.,r,r.,s,s.,t,t.,u,u.,v,v.,w,w.,x,x.,y,y.,z,z.)
  halt
}
#Dots end


I have added a menu for it the dots so you can turn it on and off whenever you wish.

#46613 02/09/03 08:10 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
Code:
alias dot {
  var %i $len($1-)
  var %dotted
  while (%i) {
    %dotted = $mid($1-,%i,1) $+ . $+ %dotted
    dec %i
  }
  return $replace($remove($left(%dotted,$calc($len(%dotted) - 1)),$chr(32)),..,.)
}

Last edited by pheonix; 02/09/03 08:14 PM.

new username: tidy_trax
#46614 02/09/03 08:10 PM
Joined: Aug 2003
Posts: 29
2
Ameglian cow
Offline
Ameglian cow
2
Joined: Aug 2003
Posts: 29
You can always just use the replace chr(). Example, replacing space with . (dot)

#46615 02/09/03 08:25 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
No he can't - that won't add the dots inside the words like the original poster wanted.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#46616 02/09/03 08:28 PM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
thanks

#46617 02/09/03 08:29 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
My one worked perfectly fine thank you, and it does exactly what it was wrote to do.

#46618 02/09/03 08:34 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
what he wants: I.w.a.n.t.t.o.a.d.d.d.o.t
what yours does: I.w.a.n.t.t.o.a.d.d.d.o.t.


new username: tidy_trax
#46619 03/09/03 04:05 AM
Joined: Jun 2003
Posts: 67
D
Babel fish
Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
$left(stuff,$calc($len(stuff) - 1))


while (demi == nub) {
inc %skill
}
#46620 03/09/03 04:09 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i know how its fixed, in case you didnt notice i used that in my code :\


new username: tidy_trax
#46621 03/09/03 07:50 PM
Joined: Jun 2003
Posts: 67
D
Babel fish
Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
no need to get cocky i didnt read ur script ihave no interest in "dotting" my text


while (demi == nub) {
inc %skill
}
#46622 03/09/03 08:01 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
I didn't see him say he only wants .'s after letters...


Link Copied to Clipboard