Shoutbox

adding a space in the end of every message - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: adding a space in the end of every message (/showthread.php?tid=70390)

adding a space in the end of every message by Double_N2 on 01-06-2007 at 06:22 PM

Hello,
What command would add a space to every message i sent?
for example
"hi! "
"hi!{space}"
Thanks.


RE: adding a space in the end of every message by roflmao456 on 01-06-2007 at 08:40 PM

why would you need a space after every message?

code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
Message = Message + " ";
return Message;
}

that should work. just make a new script and name it to something and paste the code in there.
RE: adding a space in the end of every message by MrT on 01-06-2007 at 08:41 PM

code:

function OnEvent_ChatWndSendMessage(ChatWnd, sMessage) {
    return sMessage + " " ;
   
}



RE: adding a space in the end of every message by Double_N2 on 01-06-2007 at 08:43 PM

I want to make words like "tho" to be "though" and i have to do it by "(space)tho(space) => "(space)though(space)
or else the word "thought" will be "thouhught"

so if the word is in the end of the sentence there will never be a space there. thats why i need this command. thank you.


RE: adding a space in the end of every message by MrT on 01-06-2007 at 08:51 PM

code:

function OnEvent_ChatWndSendMessage(ChatWnd, sMessage) {

    Message = replace(Message, "tho", "though");
    return Message ;

}



like this?
RE: adding a space in the end of every message by roflmao456 on 01-06-2007 at 08:55 PM

i dont get it, but il try:

code:
/*
Just add ,"" in the array between the brackets if you want to add more.

this is NanaFreak's and markee's code. so credits to him.
*/


var changeFrom = new Array("tho","thouhught"// changing word
var changeTo = new Array("though","thought") // change to this

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
for(i in original){
Message = Message.replace(original[i],changed[i]);
}

i do not think that you can use " => " to change it .... correct me if im wrong.