mIRC Home    About    Download    Register    News    Help

Print Thread
#166154 07/12/06 03:39 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I made a theme, and everything i type is put to a %var befor it sends to the channel, how would i the simplest way replace words in the %var ? lets say it is: "%var I will bb" then i want bb to be replaced with be back .. or if i type "i will bbl, see you soon", then bbl should be replaced with be back later, i solved it if it's stored as firts input in the %var, but not if it's in the middle or if it's in the end of the %var .. i did try to solve it true the mirc.hlp, but couldent.. any ideas?

;--------- Edit

Every word that would be replaced are stored in a txt file..

Last edited by sparta; 07/12/06 03:42 AM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #166156 07/12/06 04:22 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Pseudocode:variable = $replace(variable,original text,new text)
Use $replacecs if you need a case sensitive version
$replaceex to restrict the replacement to strings that haven't been changed (this is handy if the original text is in the new text)
$replaceexcs: case sensitive version of $replaceex

You might also do a search for an Acro or Acronym script..I know they've been done a lot on various sites.


Link Copied to Clipboard