Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Users/Properties/Count: Difference between revisions
Jump to navigation
Jump to search
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
Animadoria (talk | contribs) No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<!-- Generated @ 08/12/2022 23: | <!-- Generated @ 08/12/2022 23:46:11 +01:00 using Anima's CHM converter based on techref/objectmodel/objects/users/properties/Count.htm --> | ||
{{Protocols/MSNP|section=Activities}} | {{Protocols/MSNP|section=Activities}} | ||
__NOTOC__= | __NOTOC__= [[Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Users/Index|Users]].Count Property = | ||
Returns the number of objects in the <span class="clsObject">Users</span> collection. This property is read-only. | Returns the number of objects in the <span class="clsObject">Users</span> collection. This property is read-only. | ||
VBScript Syntax | === VBScript Syntax === | ||
<div class="clsCodeIndent"> | <div class="clsCodeIndent"> | ||
Line 13: | Line 13: | ||
</div> | </div> | ||
JavaScript Syntax | === JavaScript Syntax === | ||
<div class="clsCodeIndent"> | <div class="clsCodeIndent"> | ||
Line 21: | Line 21: | ||
</div> | </div> | ||
Property Value | === Property Value === | ||
An integer containing the number of users in the current conversation window. | An integer containing the number of users in the current conversation window. | ||
Line 29: | Line 29: | ||
If there are no participants other than the user, the count will be 1. | If there are no participants other than the user, the count will be 1. | ||
JavaScript Example | === JavaScript Example === | ||
To print the number of users in this conversation, write the value of <span class="clsMethod">users.Count</span>. | To print the number of users in this conversation, write the value of <span class="clsMethod">users.Count</span>. | ||
Line 40: | Line 40: | ||
document.write(window.external.Users.Count + " player(s)"); | document.write(window.external.Users.Count + " player(s)"); | ||
</script> | </script> | ||
//--> | //--></pre> | ||
</div> | </div> | ||
Remarks | === Remarks === | ||
In MSN® Messenger version 6.0, peer-to-peer activity has a maximum of two users, so the <span class="clsProperty">Count</span> property will return 1 or 2. | In MSN® Messenger version 6.0, peer-to-peer activity has a maximum of two users, so the <span class="clsProperty">Count</span> property will return 1 or 2. |
Latest revision as of 02:16, 13 August 2022
Users.Count Property
Returns the number of objects in the Users collection. This property is read-only.
VBScript Syntax
numParticipants = window.external.Users.Count
JavaScript Syntax
var numParticipants; numParticipants = window.external.Users.Count;
Property Value
An integer containing the number of users in the current conversation window.
Because a conversation window must be opened in order to get this property, the count will never be 0.
If there are no participants other than the user, the count will be 1.
JavaScript Example
To print the number of users in this conversation, write the value of users.Count.
<script type="JavaScript"> <!-- // Print the number of participants in the body of the document. document.write(window.external.Users.Count + " player(s)"); </script> //-->
Remarks
In MSN® Messenger version 6.0, peer-to-peer activity has a maximum of two users, so the Count property will return 1 or 2.