mIRC Home    About    Download    Register    News    Help

Print Thread
#137239 10/12/05 03:19 PM
Joined: Feb 2005
Posts: 74
S
SkyD Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Feb 2005
Posts: 74
Please help!
I need a script which can makes in the sentence a to apa, e to epe, i to ipi, o to opo and u to upu..
There's example: LITTLE to LIPITTLEPE , ARNOLD to APARNOPOLD and other words..

And i have one more problem:
If someone writes !names a,b,c,d,e,f,g need to write the names in txt file like that
File.txt:
a
b
c

....


[color:red]m[color:blue]IRC[color:green] for EvEr

#137240 10/12/05 03:53 PM
Joined: Dec 2004
Posts: 81
N
Babel fish
Offline
Babel fish
N
Joined: Dec 2004
Posts: 81
Your first question, you want it for when you type a sentence or when a user types a sentence?

Your second question:

Code:
on *:TEXT:!names *:#channel:{
  if ($numtok($2-,44)) {
    var %idx = 0
    while (%idx < $numtok($2-,44)) {
      inc %idx
      write file.txt $gettok($2-,%idx,44)
    }
  }
}


You'll have to edit the code:
#channel - replace with an actual channel name (eg, #blah)
file.txt - replace with a filename of your choice

#137241 10/12/05 04:02 PM
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
1.
Hapah ipi upusepe topo tapalk lipikepe thipis whepen ipi wapas lipittlepe smile

//var %x = $regsub(Hah i use to talk like this when i was little,/([aouie]{1,2})/g,\1p\1,%t) | echo -a %t

2.
Code:
on *:TEXT:!names *:#channel:{
  tokenize 44 $2-
    while ($1) {
      write file.txt $1
      tokenize 32 $2-
    }
  }
}





$maybe
#137242 10/12/05 04:16 PM
Joined: Feb 2005
Posts: 74
S
SkyD Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Feb 2005
Posts: 74
and how can i make the real text in bold...

example: artis to apartipis

Last edited by SkyD; 10/12/05 04:32 PM.

[color:red]m[color:blue]IRC[color:green] for EvEr

#137243 10/12/05 08:48 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
You should really ask for all of it at once, and not ask for bolding after it was thought out without it

#1 usage $wierd.txt.addon(<your text here>)

alias wierd.txt.addon { return $iif($0,$+(,$replacexcs($1,a,apa,e,epe,i,ipi,o,opo,u,upu,A,APA,E,EPE,I,IPI,O,OPO,U,UPU),)) }


#2 usage someone types !names a,b,c,d,e,f

on *:text:!names *:*:{ tokenize 44 $2- | write file.txt $* }

#137244 11/12/05 10:49 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Awwww I want to figure out regex solutions frown :tongue: grin

Anways, here's a possible fix for the bold stuff, just make sure there's no bold in the text before.
//var %x = $regsub(Hah i used to talk like this when i was little,/([aouie]{1,2})/g,\1p\1,%t) | echo -a $+(,%t,)

#137245 11/12/05 10:51 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
For 2. you can just do:

tokenize 44 $$2
write file.txt $*

EDIT: Just noticed DaveC already used that.


Gone.
#137246 11/12/05 04:30 PM
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
//echo -a $replacexcs(three,a,apa,e,epe,i,ipi,o,opo,u,upu,A,APA,E,EPE,I,IPI,O,OPO,U,UPU),)

should return threepee not threpeepe like it does, guess you can only know that if you talked like this yourself :P

1
As kelder said make sure theres no bold infront so just strip it from the text you sent to the regex identifier
//var %x = $regsub($strip($1-,b),/([aouie]{1,2})/g,\1p\1,%t) | echo -a $+(,%t,)


2
Always outdone by DaveC or FiberOPtics this is getting old frown laugh


$maybe
#137247 11/12/05 11:57 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
//echo -a $replacexcs(three,a,apa,e,epe,i,ipi,o,opo,u,upu,A,APA,E,EPE,I,IPI,O,OPO,U,UPU),)

should return threepee not threpeepe like it does, guess you can only know that if you talked like this yourself :P


So SkyD gave us incorrect directions? becuase three -> threepee is nothing like what he said he wanted. I also wasnt sur eif the P was ment to remain in the capatilization of the vowel.


Link Copied to Clipboard