segosa
Community's Choice
Posts: 1407 Reputation: 92
Joined: Feb 2003
|
RE: RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
quote: Originally posted by Joereynolds89
lol thankyou Pai, finally got it all working if anyone actually wants to use it ill upload but all it does is change your font but i wanted it Thankyou to everyone that helped!
Segosa, i did all yours, i dont understand yours as i do Pai's but it didnt work
code: function OnEvent_Initialize(MessengerStart)
{
}
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage)
{
if (!sMessage.match('www') && !sMessage.match('http') && sMessage.charAt(0) != '/')
{
var a = [ 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' ];
var o = "", c;
str = str.toLowerCase();
for (var i = 0; i < str.length; i++)
{
c = str.charCodeAt( i );
if (c >= 97 && c <= 122)
o += a[c - 97];
else o += str.charAt( i );
}
return o;
}
return sMessage;
}
function OnEvent_Uninitialize(MessengerExit)
{
}
Remember capitals are only for example
Crap, sorry, I forgot to change something.
Since you've already got your own working, it won't matter, but here's the working code:
code: function OnEvent_Initialize(MessengerStart)
{
}
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage)
{
if (!sMessage.match('www') && !sMessage.match('http') && sMessage.charAt(0) != '/')
{
var a = [ 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' ];
var o = "", c;
var str = sMessage.toLowerCase();
for (var i = 0; i < str.length; i++)
{
c = str.charCodeAt( i );
if (c >= 97 && c <= 122)
o += a[c - 97];
else o += str.charAt( i );
}
return o;
}
return sMessage;
}
function OnEvent_Uninitialize(MessengerExit)
{
}
The previous sentence is false. The following sentence is true.
|
|