Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Methods/SendIMAsUser: 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:59 +01:00 using Anima's CHM converter based on techref/objectmodel/objects/channel/methods/SendIMAsUser.htm --> | ||
{{Protocols/MSNP|section=Activities}} | {{Protocols/MSNP|section=Activities}} | ||
__NOTOC__= | __NOTOC__= [[Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Index|Channel]].SendIMAsUser Method (Restricted) = | ||
This method sends an instant message that appears to come from the user. The method is labeled "restricted" because it requires the ReplaceIM permission flag. For more information, see [[Protocols/MSNP/Activities/SDK | This method sends an instant message that appears to come from the user. The method is labeled "restricted" because it requires the ReplaceIM 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 24: | Line 24: | ||
:Handler | :Handler | ||
Document.Write("SendIMAsUser failed. Error Description: " & err.description) | Document.Write("SendIMAsUser failed. Error Description: " & err.description) | ||
End Sub | End Sub</pre> | ||
</div> | </div> | ||
JavaScript Syntax | === JavaScript Syntax === | ||
<div class="clsCodeStd"> | <div class="clsCodeStd"> | ||
Line 46: | Line 45: | ||
document.write("SendIMAsUser failed. Error Description: " + ex.description); | document.write("SendIMAsUser failed. Error Description: " + ex.description); | ||
} | } | ||
} | }</pre> | ||
</div> | </div> | ||
Parameters | === Parameters === | ||
; bstrIM | ; bstrIM | ||
: A string containing the data to be sent as an instant message. | : A string containing the data to be sent as an instant message. | ||
Return Values | === Return Values === | ||
No return value. | No return value. | ||
Remarks | === Remarks === | ||
An exception is thrown if the application does not have ReplaceIM permission, or if the instant message could not be sent. | An exception is thrown if the application does not have ReplaceIM permission, or if the instant message could not be sent. |
Latest revision as of 01:38, 13 August 2022
Channel.SendIMAsUser Method (Restricted)
This method sends an instant message that appears to come from the user. The method is labeled "restricted" because it requires the ReplaceIM permission flag. For more information, see Standard vs. Advanced Applications.
VBScript Syntax
Dim myChannel Dim myOutput set myChannel = external.Channel myOutput = "This is really the application!" sub cmdImpersonateButton_OnClick ' Send an instant message that appears to come from the application. On Error Goto Handler myChannel.SendIM(myOutput) Exit Sub :Handler Document.Write("SendIMAsUser failed. Error Description: " & err.description) End Sub
JavaScript Syntax
var myChannel; var myOutput; myChannel = window.external.Channel; myOutput = "This is really the application!"; function cmdImpersonateButton_OnClick() { // Send an instant message that appears to come from the application. try { myChannel.SendIM(myOutput); } catch(ex) { document.write("SendIMAsUser failed. Error Description: " + ex.description); } }
Parameters
- bstrIM
- 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 ReplaceIM permission, or if the instant message could not be sent.