ReplaceIM and RecieveIM - How to use???

Say the user types 'hello' and presses send, is their a way to replace 'hello' with 'hello, how are you' before it is sent out.
So the modified message is sent.

Also, can this be done on recieving messages as well, so the recieved message is modified before it is displayed

Because their is the 'ReplaceIM' and 'RecieveIM' properties and i would like to know how to use these.

Thanks
-Balupton




Answer this question

ReplaceIM and RecieveIM - How to use???

  • Nathan Jaynes

    OT: Wow, That code is really handy.

  • chr1zis

     Carmen Zlateff MSN wrote:
    Yes that functionality is possible, however access to it is restricted, meaning you need to work directly with the MSN team in order to get permission to use them, and for the app building contest these are not allowed. 

    Is SendIM not allowed either then :(



  • Harbinger918

    'ReplaceIM' and 'RecieveIM' tag to True in messanger xml file


    function Channel_OnRemoteAppClosed()
    {
    msChannel.SendIM( fetchRemoteNickname() + " Has Left the Conversasion ");
    }

    function fetchRemoteNickname()
    {
    for (i = 0; i < window.external.Users.Count; i++)
    {
    if (window.external.Users.Item(i) != window.external.Users.Me)
    {
    return window.external.Users.Item(i).Name;
    }
    }
    return false;
    }

    when i invite a friend and either i or my friend close the activity window,

    we both get the message at both the

    Bikash Has Left the Conversasion

    ideally it should apper on the one end only

    or is it default that the message should come at both end

    can you please help me



  • lotusvball

    What is the exact problem you are having with ReplaceIM not working   Do you get any error messages at runtime   Or, does the event never fire

    Make sure you have the ReplaceIM property set to "True" in your msgrp2p.xml file.

    On the question of making your app visible once it is completed: While we would very much like to see your app, it must be submitted for compliance checking by someone who is 18 years of age or older.

    All Activity applications, whether in the contest, or on commercial terms must pass compliance checking.  The first step of compliance checking is for the application author or company submitting the app to agree to the Activity API terms of use and certify that the application they are submitting does not violate these terms.  Since this is actually a legal agreement, it must be done by someone 18 years of age or older.

    While we are opening the Activity API publically, we must still be very careful to protect the 170 million world-wide users of MSN Messenger from those who would seek to use the API inappropriately.  Thats why there is compliance checking for all applications.  By reducing the number of APIs that can be used in the contest,  we are able to simplify the compliance checking process and thus certify more applications than we would normally be able to.

     -Scott



  • Namtab

    Yes that functionality is possible, however access to it is restricted, meaning you need to work directly with the MSN team in order to get permission to use them, and for the app building contest these are not allowed. 

    A great scenario where ReplaceIM makes sense would be in a language translation app.  I type "Hi" and before it's placed in my french-speaking buddys' conversation window it's changed to "Bonjour".

  • Morris71

    im under 18 so i cant enter the contest but ive already made a translator, it is viewable here http://forums.microsoft.com/msdn/ShowPost.aspx PostID=87959
    So like you said it would be a good idea in my case.

    I've already set the permissions for ReplaceIM and RecieveIM to true.
    And in the documentation it said the i should be able to change the incoming messages by Channel.IM = "message"; but i havent tried it yet.

    Thanks
    -BALUPTON


  • Thomas Mikolajczyk

    Ok, well for some of us (namely me) are not entering the contest, so how can we get ReplaceIM working for outgoing and incoming messages

    And what do we do with out activity once we are satisfied with it Like how do we go about actually getting it in the activity menu


  • kyeran

    Ok for the people under 18, wouldnt our parents or guardians be able to do the legal requirements that we are suppose to do

    And with ReplaceIM i can modify incoming messages easily with this code:


    <script language="javascript" type="text/javascript">
    var Channel = window.external.Channel;
    function Channel_OnIMReceived() {
        Channel.IM = Channel.IM + "[cool]";
    }
    </script>

     


    But i would like to know how you modify outgoing messages
    (Eg. I would like to modify messages im sending to my buddy)
    So the my buddy would recieve a modified version of my message.
    And if so would I see the modified message, or just my buddy

    Thanks
    -BALUPTON


  • Wasting Body

    For the contest you may use SendIM and ReceiveIM.  SendIM places a message in the conversation stream - and the message is identified as having come from the Activity application.  ReplaceIM modifies a message entered by a user without necessarily telling the users in the conversation that it has done so.  Obviously, this has security implications and thats why it requires special permission to use and is not available in the contest.

     -Scott

  • ReplaceIM and RecieveIM - How to use???