Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Methods/EnterIM
<a class="clsStd" href="/techref/objectmodel/objects/channel/index.htm">Channel</a>.EnterIM Method (Restricted)
This method inserts a string into the text input area after any existing text. The method is labeled "restricted" because it is only available if the application has the SendIM permission flag. For more information, see [[Protocols/MSNP/Activities/SDK/../../../../../Sandbox|Standard vs. Advanced Applications]].
VBScript Syntax
set myChannel = external.Channel sub cmdEnterIMButton_OnClick ' Enter a string into the text input area; the user must press [ENTER] to send the suggested message. On Error Goto Handler myChannel.EnterIM("This is inserted into the text input area.") Exit Sub :Handler Document.Write("EnterIM failed. Error Description: " & err.description) End Sub
JavaScript Syntax
myChannel = window.external.Channel; function cmdEnterIMButton_OnClick() { // Enter a string into the text input area; the user must press [ENTER] to send the suggested message. try { myChannel.EnterIM("This is entered in the text input area."); } catch(ex) { document.write("EnterIM failed. Error Description: " + ex.description); } }
Parameters
- IM
- A string containing the data to insert into the text input area.
Return Values
No return value.
Remarks
An exception is thrown if the application does not have SendIM permission, or if the text could not be inserted.