Shoutbox

Unique request,well not so unique - 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: Unique request,well not so unique (/showthread.php?tid=67638)

Unique request,well not so unique by hearwithoutyou on 10-24-2006 at 03:26 PM

Could someone please make me a script. All i want is the script to be able to replace text(i already know how to do that) but heres the exception i don't want  it to replace the text i type when the contact I'm chatting with is online from his mobile.Example : When the person is online from a mobile his personal message is replace with "(Online)".So i don't want my text to be replaced when the person online from his mobile. Can anyone help me. I know its a very simple thing to do 


RE: Unique request,well not so unique by matty on 10-24-2006 at 03:36 PM

Messenger Plus! does not allow commands or messages to be parsed by mobile conversations as people with Mobile Messenger cannot use Plus!.


RE: Unique request,well not so unique by hearwithoutyou on 10-24-2006 at 03:41 PM

Umm...uve got the wrong idea...ill try to giv a a more expressive example...i think i didnt put it to u the right way...for example: if a person using a mobile phone gets online on msn through a service such as ebuddy or e-messenger or mig33 hes shown as online from a mobile on the strating part of the conversation "Messages you type here are delivered to a mobile phone or page....." n so on is displayed.it is for those contact i do not want my text to be replaced


RE: Unique request,well not so unique by matty on 10-24-2006 at 05:38 PM

quote:
Originally posted by Matty
Messenger Plus! does not allow commands or messages to be parsed by mobile conversations as people with Mobile Messenger cannot use Plus!.
quote:
Originally posted by hearwithoutyou
if a person using a mobile phone gets online on msn
They are still using the mobile service. Plus! does not allow you to interact with it.
RE: Unique request,well not so unique by Spunky on 10-24-2006 at 08:13 PM

Matty, the replacing of text happens on a PC that uses MP!L, not on the mobile device. The mobile does not need MP!L, just as a normal users doesn't need it to receive messages that have had text replaced via a script.

Don't know if you can detect if a window is a "Mobile" contact though.

400th Post :D


RE: Unique request,well not so unique by matty on 10-24-2006 at 09:27 PM

quote:
Originally posted by SpunkyLoveMuff
Matty, the replacing of text happens on a PC that uses MP!L, not on the mobile device. The mobile does not need MP!L, just as a normal users doesn't need it to receive messages that have had text replaced via a script.
Thats not what I am saying.

What he is trying to do is send Arabic characters to contacts that are signing in through their Mobile phone on e-messenger or a service like that.

The mobile conversation shouldn't be recognized through Messenger Plus!.

If you want to use an else statement to not send the stylish text to them just do

code:
if (Email != "johndoe@hotmail.com || Email != "johndoe2@hotmail.com){
   // stylize text
}

RE: Unique request,well not so unique by hearwithoutyou on 10-25-2006 at 08:32 AM

i want the characters to be seen to only the contacts who are online from their computer and NOT from their mobile.Cos some character are not displayed correctly on the mobile.I guess its not possible to do it with scripts.thnx for the reply


RE: Unique request,well not so unique by hearwithoutyou on 10-25-2006 at 09:46 AM

/*
----------
|Stylizer|
----------
*/

function OnGetScriptMenu(nLocation){
    var showbit = '';
    return "<ScriptMenu><MenuEntry Id=\"WndAbout\">About</MenuEntry></ScriptMenu>";
}

function OnEvent_MenuClicked(sMenuId,nLocation,iOriginWnd){
    if(sMenuId == "GetLatest"){ GetLatest(true); }
    else if(sMenuId == "Options"){
            var wnd = MsgPlus.CreateWnd('windows.xml','WndOptions');

    }
else if(sMenuId == "WndAbout"){
            var wnd = MsgPlus.CreateWnd('windows.xml','WndAbout');
    }
    else if(sMenuId == "Shownews"){ iOriginWnd.SendMessage("(*) "+latestnews); }
}




function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
sMessage = sMessage.replace("a","&#945;");
sMessage = sMessage.replace("b","b");
sMessage = sMessage.replace("c","¢");
sMessage = sMessage.replace("d","&#8706;");
sMessage = sMessage.replace("e","&#1108;");
sMessage = sMessage.replace("f","ƒ");
sMessage = sMessage.replace("g","g");
sMessage = sMessage.replace("h","&#1085;");
sMessage = sMessage.replace("i","&#8054;");
sMessage = sMessage.replace("j","j");
sMessage = sMessage.replace("k","&#1082;");
sMessage = sMessage.replace("l","&#8467;");
sMessage = sMessage.replace("m","&#1084;");
sMessage = sMessage.replace("n","&#951;");
sMessage = sMessage.replace("o","&#963;");
sMessage = sMessage.replace("p","&#961;");
sMessage = sMessage.replace("q","q");
sMessage = sMessage.replace("r","&#1103;");
sMessage = sMessage.replace("s","s");
sMessage = sMessage.replace("t","&#1090;");
sMessage = sMessage.replace("u","&#965;");
sMessage = sMessage.replace("v","&#957;");
sMessage = sMessage.replace("w","&#974;");
sMessage = sMessage.replace("x","&#967;");
sMessage = sMessage.replace("y","&#947;");
sMessage = sMessage.replace("z","&#658;");
return sMessage;
}

the above code works when i type in the message it changes what i type in to the defined letters.
the unicord chracters replace the original text properly
now the only problem is when two unicord characters are in the same sentence
example:
hi
^ the above sentence works but
: hello
that doesn't work
because there are two l's in the sentence only 1 l gets replaced the other stays the same
Can anyone help me in solving this
also can anyone tell me how i can make so that
when i open the a conversation with a contact i want
and type a command with a "/" this replacement technique is disabled. but it should not be disabled for everyone, only for that particular contact
Thnx for the help everyone


RE: Unique request,well not so unique by matty on 10-25-2006 at 12:10 PM

[/code]function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
sMessage = sMessage.replace(/a/gi,"&#945;");
return sMessage;
}[/code]
Add the bolded parts to each of the replaces statements. That will replace all characters in the message.


RE: RE: Unique request,well not so unique by Jesus on 10-25-2006 at 12:16 PM

quote:
Originally posted by Matty
If you want to use an else statement to not send the stylish text to them just do

code:
if (Email != "johndoe@hotmail.com || Email != "johndoe2@hotmail.com){
   // stylize text
}


[maybe a bit offtopic]
what's the use of an if-statement if it always returns true?
it does the same as
code:
// stylize text
or am I missing something here?
[/maybe a bit offtopic]
RE: Unique request,well not so unique by matty on 10-25-2006 at 12:49 PM

Blah its if he knows who is signed in on their phone he can put the email there, so if the email isn't one of those people then stylize the text.


RE: RE: Unique request,well not so unique by Jesus on 10-25-2006 at 02:08 PM

quote:
Originally posted by Matty
Blah its if he knows who is signed in on their phone he can put the email there, so if the email isn't one of those people then stylize the text.

true, but they're not always online using their phones.
aside from that, using this statement
code:
if (Email != "johndoe@hotmail.com || Email != "johndoe2@hotmail.com){
   // stylize text
}
will ALWAYS execute the code, since if Email has value "johndoe@hotmail.com" then it would be
code:
if (false || true) // thus TRUE
{
// execute code
}
so there's no point in having an if-statement this way because if you != 1 variable against more than 1 value, it will always return true.
RE: Unique request,well not so unique by Spunky on 10-25-2006 at 02:20 PM

code:
if (Email != "johndoe@hotmail.com && Email != "johndoe2@hotmail.com){
   // stylize text
}


That should work though
RE: Unique request,well not so unique by matty on 10-25-2006 at 02:50 PM

Blah I was typing quickly you could have simply just said use && and not || geez 8-).


RE: Unique request,well not so unique by Spunky on 10-25-2006 at 02:52 PM

Thats why I replied with that code. Jesus didn't really explain how to fix it :p


RE: Unique request,well not so unique by RaceProUK on 10-25-2006 at 09:13 PM

quote:
Originally posted by SpunkyLoveMuff
Don't know if you can detect if a window is a "Mobile" contact though.
Programattically, yes you can. I believe the window classes are IMWindowClass and MobileMessageWindow. Three guesses at which one is which...
RE: RE: Unique request,well not so unique by Jesus on 10-25-2006 at 09:38 PM

quote:
Originally posted by Matty
Blah I was typing quickly you could have simply just said use && and not || geez 8-).

could have caused alot of confusion :|