Speeddymon54123@legacy41573388 (talk | contribs) |
Speeddymon54123@legacy41573388 (talk | contribs) No edit summary |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} |
{{wowapi}} |
||
+ | Returns possible player names matching a given prefix string and specified requirements. |
||
+ | nick1, nick2, ... = GetAutoCompleteResults("text", include, exclude, maxResults[, cursorPosition]); |
||
+ | == Arguments == |
||
− | Gets the results of the built-in autocomplete, based on the text currently entered into an editbox. |
||
⚫ | |||
⚫ | |||
+ | ;include: Number - bit mask of [[#Filter values|filters]] that the results '''must''' match at least one of. |
||
⚫ | |||
+ | ;exclude: Number - bit mask of [[#Filter values|filters]] that the results '''must not''' match any of. |
||
⚫ | |||
+ | ;maxResults: Number - number of results desired. |
||
⚫ | |||
⚫ | |||
− | cursorPosition); |
||
− | == |
+ | === Filter values === |
+ | The two bit mask parameters can be composed from the following components: |
||
+ | {| class="darktable" style="margin-left: 3em" |
||
+ | ! Global constant name !! Value !! Matches |
||
+ | |- |
||
+ | | AUTOCOMPLETE_FLAG_NONE || 0x00000000 || No one |
||
+ | |- |
||
+ | | AUTOCOMPLETE_FLAG_IN_GROUP || 0x00000001 || ? |
||
+ | |- |
||
+ | | AUTOCOMPLETE_FLAG_IN_GUILD || 0x00000002 || ? |
||
+ | |- |
||
+ | | AUTOCOMPLETE_FLAG_FRIEND || 0x00000004 || Players on your friends list |
||
+ | |- |
||
+ | | AUTOCOMPLETE_FLAG_INTERACTED_WITH || 0x00000010 || ? |
||
+ | |- |
||
+ | | AUTOCOMPLETE_FLAG_ONLINE || 0x00000020 || Currently online players |
||
+ | |- |
||
+ | | AUTOCOMPLETE_FLAG_ALL || 0xffffffff || Anyone |
||
+ | |} |
||
+ | == Returns == |
||
− | <big>'''Arguments'''</big> |
||
+ | ; nick1, nick2, ... : String - auto-completed name of a player that satisfies the requirements. |
||
− | :("text", parent.autoCompleteParams.include, parent.autoCompleteParams.exclude, AUTOCOMPLETE_MAX_BUTTONS+1, cursorPosition) |
||
− | |||
⚫ | |||
− | :;parent.autoCompleteParams.include: Numeric - arbitrary value assigned by Blizzard based on the type of editbox, as to what type of names to include |
||
− | :;parent.autoCompleteParams.exclude: Numeric - arbitrary value assigned by Blizzard based on the type of editbox, as to what type of names to exclude |
||
− | :;AUTOCOMPLETE_MAX_BUTTONS: - Numeric - arbitrary value assigned by Blizzard to determine how many buttons to include in the AutoComplete dropdown. Add 1 to allow for a disabled button that indicates there are more names than can be shown by the default AutoComplete dropdown. |
||
⚫ | |||
== Example == |
== Example == |
||
Assuming you are sending a mail to someone whose name starts with "a", and that the Send Mail window is open |
Assuming you are sending a mail to someone whose name starts with "a", and that the Send Mail window is open |
||
⚫ | |||
− | GetAutoCompleteResults("a", SendMailNameEditBox.autoCompleteParams.include, SendMailNameEditBox.autoCompleteParams.exclude, AUTOCOMPLETE_MAX_BUTTONS+1, SendMailNameEditBox:GetCursorPosition()) |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | SendMailNameEditBox:GetCursorPosition()) |
Revision as of 16:59, 8 August 2009
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns possible player names matching a given prefix string and specified requirements.
nick1, nick2, ... = GetAutoCompleteResults("text", include, exclude, maxResults[, cursorPosition]);
Arguments
- text
- String - first characters of the possible names to be autocompleted
- include
- Number - bit mask of filters that the results must match at least one of.
- exclude
- Number - bit mask of filters that the results must not match any of.
- maxResults
- Number - number of results desired.
- cursorPosition
- Number - position of the cursor within the editbox (i.e. how much of the text string should be matching).
Filter values
The two bit mask parameters can be composed from the following components:
Global constant name | Value | Matches |
---|---|---|
AUTOCOMPLETE_FLAG_NONE | 0x00000000 | No one |
AUTOCOMPLETE_FLAG_IN_GROUP | 0x00000001 | ? |
AUTOCOMPLETE_FLAG_IN_GUILD | 0x00000002 | ? |
AUTOCOMPLETE_FLAG_FRIEND | 0x00000004 | Players on your friends list |
AUTOCOMPLETE_FLAG_INTERACTED_WITH | 0x00000010 | ? |
AUTOCOMPLETE_FLAG_ONLINE | 0x00000020 | Currently online players |
AUTOCOMPLETE_FLAG_ALL | 0xffffffff | Anyone |
Returns
- nick1, nick2, ...
- String - auto-completed name of a player that satisfies the requirements.
Example
Assuming you are sending a mail to someone whose name starts with "a", and that the Send Mail window is open
GetAutoCompleteResults("a", SendMailNameEditBox.autoCompleteParams.include, SendMailNameEditBox.autoCompleteParams.exclude, AUTOCOMPLETE_MAX_BUTTONS+1, SendMailNameEditBox:GetCursorPosition())