Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Methods/SendIM: Difference between revisions
Jump to navigation
Jump to search
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
||
Line 1: | Line 1: | ||
<!-- Generated @ 08/12/2022 23: | <!-- Generated @ 08/12/2022 23:45:58 +01:00 using Anima's CHM converter based on techref/objectmodel/objects/channel/methods/SendIM.htm --> | ||
{{Protocols/MSNP|section=Activities}} | {{Protocols/MSNP|section=Activities}} | ||
__NOTOC__= <a class="clsStd" href="/techref/objectmodel/objects/channel/index.htm">Channel</a>.SendIM Method (Restricted) = | __NOTOC__= <a class="clsStd" href="/techref/objectmodel/objects/channel/index.htm">Channel</a>.SendIM Method (Restricted) = | ||
This method sends an instant message that appears to come from the application. The method is labeled "restricted" because it requires the SendIM permission flag. For more information, see [[Protocols/MSNP/Activities/SDK | This method sends an instant message that appears to come from the application. The method is labeled "restricted" because it requires the SendIM permission flag. For more information, see [[Protocols/MSNP/Activities/SDK/Sandbox|Standard vs. Advanced Applications]]. | ||
VBScript Syntax | VBScript Syntax |
Revision as of 22:45, 12 August 2022
<a class="clsStd" href="/techref/objectmodel/objects/channel/index.htm">Channel</a>.SendIM Method (Restricted)
This method sends an instant message that appears to come from the application. The method is labeled "restricted" because it requires the SendIM permission flag. For more information, see Standard vs. Advanced Applications.
VBScript Syntax
Dim myChannel Dim myOutput set myChannel = external.Channel myOutput = "That's checkmate!" sub cmdSendIMButton_OnClick ' Send an instant message that appears to come from the application. On Error Goto Handler myChannel.SendIM(myOutput) Exit Sub :Handler Document.Write("SendIM failed. Error Description: " & err.description) End Sub
JavaScript Syntax
var myChannel; var myOutput; myChannel = window.external.Channel; myOutput = "That's checkmate!"; function cmdSendIMButton_OnClick() { // Send an instant message that appears to come from the application. try { myChannel.SendIM(myOutput); } catch(ex) { document.write("SendIM failed. Error Description: " + ex.description); } }
Parameters
- myIM
- A string containing the data to be sent as an instant message.
Return Values
No return value.
Remarks
An exception is thrown if the application does not have SendIM permission, or if the instant message could not be sent.