Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Users/Methods/Item: Difference between revisions
Jump to navigation
Jump to search
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
Animadoria (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<!-- Generated @ 08/12/2022 23:46:10 +01:00 using Anima's CHM converter based on techref/objectmodel/objects/users/methods/Item.htm --> | <!-- Generated @ 08/12/2022 23:46:10 +01:00 using Anima's CHM converter based on techref/objectmodel/objects/users/methods/Item.htm --> | ||
{{Protocols/MSNP|section=Activities}} | {{Protocols/MSNP|section=Activities}} | ||
__NOTOC__= | __NOTOC__= [[Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Users/Index|Users]].Item Method = | ||
Returns a <span class="clsObject">User</span> object. | Returns a <span class="clsObject">User</span> object. | ||
VBScript Syntax | === VBScript Syntax === | ||
<div class="clsCodeIndent"> | <div class="clsCodeIndent"> | ||
<pre class="clsCode">myUser = Users.Item(n) | <pre class="clsCode">myUser = Users.Item(n)</pre> | ||
</div> | </div> | ||
JavaScript Syntax | === JavaScript Syntax === | ||
<div class="clsCodeIndent"> | <div class="clsCodeIndent"> | ||
<pre class="clsCode">myUser = window.external.Users.Item(n); | <pre class="clsCode">myUser = window.external.Users.Item(n); </pre> | ||
</div> | </div> | ||
Parameters | === Parameters === | ||
; lPos | ; lPos | ||
: A long value representing the <span class="clsObject">User</span> object to return, between 0 and (<span class="clsMethod">Users.Count</span> - 1). | : A long value representing the <span class="clsObject">User</span> object to return, between 0 and (<span class="clsMethod">Users.Count</span> - 1). | ||
JavaScript Example | === JavaScript Example === | ||
The following code produces the output shown below: | The following code produces the output shown below: | ||
Line 40: | Line 38: | ||
} | } | ||
document.write("<br>"); | document.write("<br>"); | ||
} | }</pre> | ||
Output: | Output: | ||
<pre class="clsSyntax">User Item 0 | <pre class="clsSyntax">User Item 0 | ||
User Item 1 (me) | User Item 1 (me)</pre> | ||
</div> | </div> | ||
Return Values | === Return Values === | ||
No return value. | No return value. | ||
Remarks | === Remarks === | ||
An exception is thrown if there is no item in the <span class="clsObject">Users</span> collection with the specified number. | An exception is thrown if there is no item in the <span class="clsObject">Users</span> collection with the specified number. | ||
<span class="clsMethod">Users.Item</span>(0) is not guaranteed to be the same as Me or Inviter. | <span class="clsMethod">Users.Item</span>(0) is not guaranteed to be the same as Me or Inviter. |
Latest revision as of 02:13, 13 August 2022
Users.Item Method
Returns a User object.
VBScript Syntax
myUser = Users.Item(n)
JavaScript Syntax
myUser = window.external.Users.Item(n);
Parameters
- lPos
- A long value representing the User object to return, between 0 and (Users.Count - 1).
JavaScript Example
The following code produces the output shown below:
var myUsers = window.external.Users; for ( i=0; i < myUsers.Count; i++ ) { document.write("User Item " + i ) ; if myUsers.Item(i) == myUsers.Me { document.write(" (me)"); } document.write("<br>"); }
Output:
User Item 0 User Item 1 (me)
Return Values
No return value.
Remarks
An exception is thrown if there is no item in the Users collection with the specified number.
Users.Item(0) is not guaranteed to be the same as Me or Inviter.