mIRC Home    About    Download    Register    News    Help

Print Thread
#108888 23/01/05 01:45 PM
Joined: Dec 2004
Posts: 8
K
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Dec 2004
Posts: 8
I've been using the following script to replace certain letters in my text with the full words of what they are abbreviating.
Code:
  
on *:INPUT:*:{
  say $caps($1-)
}
alias caps {
  %lmao = $replacex($1,lol,Laughing out Loud}
  %lmao = $replacex(%lmao,ty,Thank You)
  etc, etc,
  return %lmao
}

However, it also replaces occurences of the letters while in the middle of the words, like typing.
I've tried a few things and all it's done is taught me you cant use wildcards =P
Is there anyway to make this work? Any help is appreciated =D

#108889 23/01/05 03:02 PM
Joined: Dec 2004
Posts: 8
K
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Dec 2004
Posts: 8
Well, after an hour and 15 minutes and 0 replies, i finally managed to come up with this.
Code:
 
on *:INPUT:*:{
    %check = 1
    while (%check <= $0) {
      %repo = $ [ $+ [ %check ] ]
      if (%repo == %caps) { %say = %say $caps(%repo) }
      else { %say = %say $ [ $+ [ %check ] ] }
      inc %check 1
    }
    say %say
    unset %say
    halt
}
alias caps {
  %lmao = $replacex($1,lol,Laughing out Loud}
  %lmao = $replacex(%lmao,ty,Thank You)
  etc, etc,
  return %lmao
}
 

If anyone can figure out how to turn the
Code:
 
    %check = 1
    while (%check <= $0) {
      %repo = $ [ $+ [ %check ] ]
      if (%repo == %caps) { %say = %say $caps(%repo) }
      else { %say = %say $ [ $+ [ %check ] ] }
      inc %check 1
    }
 

part into alias, i would apreciate it =D and maybe figure out a way to clean up the caps alias so i dont have to type
%lmao = $replacex(%lmao,letters,replace with}
for every abbreviation. Any help is appreciate... o.o

#108890 23/01/05 03:20 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
This has been asked a lot of times before, with each time a lot of replies following it.

Try the Search feature of this board, use search word +acro, expand to 2 years or so, and choose the Scripts & Popups forum.


Gone.

Link Copied to Clipboard