Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Properties/IM
<a href="/techref/objectmodel/objects/channel/index.htm">Channel</a>.IM (read-write) Property (Restricted)
This property returns a string containing the instant message that has been received. It contains new data whenever the OnIMReceived event fires. With ReplaceIM permission, the string can be changed during the OnIMReceived event, before it is displayed. This property is labeled "restricted" because it is only available if the application has the ReplaceIM permission. For more information, see Standard vs. Advanced Applications.
VBScript Syntax
external.Channel.IM
JavaScript Syntax
window.external.Channel.IM
Property Value
A string object containing the instant message received from the remote Messenger client.
Example
This example illustrates the translation of an instant message.
// Changing an IM before it is displayed requires ReplaceIM permission flag. var myChannel = window.external.Channel; function Translate(mySourceText) { // define translation function here } function Channel_OnIMReceived() { var translated; translated = Translate( myChannel.IM ); myChannel.IM = translated; }
Remarks
This property contains data that should be inspected every time the OnIMReceived event occurs.
Changes must be made to Channel.IM before the OnIMReceived event is finished to be displayed in the Chat History window.