mIRC Homepage
Posted By: Zyzzyx26 Automatic word replacement - 13/03/04 02:05 PM
I used x-chat for about 1 week, just to try it out. A great feature i liked in x-chat was the word replacement one.
Whenever you typed the word hb, for example, the program would automatically replace it for Hurry Back.

This was a configurable feature, so you could adapt it for you pwn personal abreviations and setttings.

I think it would be nice to get sth like this on mIRC smile
Posted By: Mentality Re: Automatic word replacement - 13/03/04 02:20 PM
Yah, this might be a nice feature...then again I find that general IRC netiquette does not like 'Laughing Out Loud' over a simple 'lol'.

For now however, there is a simple way to script it (Taken from this page which contains further help)

Code:
on *:INPUT:*: {
  if (/* !iswm $1) {
    var %text = $reptok($1-,brb,Be Right Back,1,32)
    var %text = $reptok(%text,lol,Laughing Out Loud,1,32)
    var %text = $reptok(%text,ty,Thank You,1,32)
    msg $active %text
    halt
  }
 }
} 


Just replicate the var %text = $reptok lines, but change the acronym part to match your needs.

Hope this helps!

Regards,
Posted By: Zyzzyx26 Re: Automatic word replacement - 13/03/04 02:37 PM
Its works great, thanks! smile

I agree that lol and brb are much better.. i was planning on using that to replace typos or abreviations, such as 'u' for 'you'.

Thanks for the quick response smile
Posted By: Mentality Re: Automatic word replacement - 13/03/04 03:48 PM
You're welcome, glad I could help smile

Happy chattin'!

Regards,
Posted By: Zyzzyx26 Re: Automatic word replacement - 15/03/04 12:11 AM
It works great here, thanks again!

I was just wondering...why is this line different from the rest?

Code:
var %text = $reptok($1-,brb,Be Right Back,1,32)


I mean, why this one has $1- and the others have %test ?
Posted By: Iori Re: Automatic word replacement - 15/03/04 12:28 AM
The first line sets the %text variable from $1- as well as any replacments needed.
The rest need to work on the contents of %text rather than the original, or any changes made by preceding $reptoks will be lost.
Posted By: Zyzzyx26 Re: Automatic word replacement - 15/03/04 12:33 AM
Oh, so the part
Code:
 var %text = 
will set the variable %text to anything after the = ?
Posted By: Iori Re: Automatic word replacement - 15/03/04 12:36 AM
yeah smile
Posted By: Zyzzyx26 Re: Automatic word replacement - 15/03/04 12:38 AM
Oh, thats cool laugh Didnt know about that :P

much better than set %text blablabla laugh

Thanks for the help!! smile
Posted By: ArunKumar Re: Automatic word replacement - 22/03/04 09:44 AM
u can try this one too (i donno scripting, i got this from one of my friends)

on *:INPUT:*: {
if (/* !iswm $1) {
msg $active $replace($1-,brb,Be Right Back)
halt
}
}


u have to paste this in Remotes. u can add more words next to 'Be Right Back' by using the comma. smile
© mIRC Discussion Forums