Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Methods/EnterIM: Difference between revisions
Jump to navigation
Jump to search
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
Animadoria (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<!-- Generated @ 08/12/2022 23: | <!-- Generated @ 08/12/2022 23:45:57 +01:00 using Anima's CHM converter based on techref/objectmodel/objects/channel/methods/EnterIM.htm --> | ||
{{Protocols/MSNP|section=Activities}} | {{Protocols/MSNP|section=Activities}} | ||
__NOTOC__= | __NOTOC__= [[Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Index|Channel]].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 | 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 | === VBScript Syntax === | ||
<div class="clsCodeStd"> | <div class="clsCodeStd"> | ||
Line 20: | Line 20: | ||
:Handler | :Handler | ||
Document.Write("EnterIM failed. Error Description: " & err.description) | Document.Write("EnterIM failed. Error Description: " & err.description) | ||
End Sub | End Sub</pre> | ||
</div> | </div> | ||
JavaScript Syntax | === JavaScript Syntax === | ||
<div class="clsCodeStd"> | <div class="clsCodeStd"> | ||
Line 38: | Line 37: | ||
document.write("EnterIM failed. Error Description: " + ex.description); | document.write("EnterIM failed. Error Description: " + ex.description); | ||
} | } | ||
} | }</pre> | ||
</div> | </div> | ||
Parameters | === Parameters === | ||
; IM | ; IM | ||
: A string containing the data to insert into the text input area. | : A string containing the data to insert into the text input area. | ||
Return Values | === Return Values === | ||
No return value. | No return value. | ||
Remarks | === Remarks === | ||
An exception is thrown if the application does not have SendIM permission, or if the text could not be inserted. | An exception is thrown if the application does not have SendIM permission, or if the text could not be inserted. |
Latest revision as of 00:58, 13 August 2022
Channel.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 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.