WoW:API GetAutoCompleteResults: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 7: | Line 7: | ||
;include: Numeric - arbitrary value assigned by Blizzard based on the type of editbox, as to what type of names to include | ;include: Numeric - arbitrary value assigned by Blizzard based on the type of editbox, as to what type of names to include | ||
;exclude: Numeric - arbitrary value assigned by Blizzard based on the type of editbox, as to what type of names to exclude | ;exclude: Numeric - arbitrary value assigned by Blizzard based on the type of editbox, as to what type of names to exclude | ||
;maxResults: - 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. | ;maxResults: - Numeric - arbitrary value assigned by Blizzard to determine how many buttons to include in the AutoComplete dropdown. | ||
;cursorPosition: - Numeric - position of the cursor within the editbox. Can usually be obtained by [[API EditBox GetCursorPosition|EditBox:GetCursorPosition]]() | Note: Add 1 to allow for a disabled button that indicates there are more names than can be shown by the default AutoComplete dropdown. | ||
;cursorPosition: - Numeric - position of the cursor within the editbox. | |||
Note: Can usually be obtained by [[API EditBox GetCursorPosition|EditBox:GetCursorPosition]]() | |||
== Returns == | == Returns == |
Revision as of 16:34, 8 August 2009
← WoW API < GetAutoCompleteResults
Gets the results of the built-in autocomplete, based on the text currently entered into an editbox.
nick1, nick2, ... = GetAutoCompleteResults("text", include, exclude, maxResults, cursorPosition);
Arguments
- text
- String - first characters of the possible names to be autocompleted
- include
- Numeric - arbitrary value assigned by Blizzard based on the type of editbox, as to what type of names to include
- exclude
- Numeric - arbitrary value assigned by Blizzard based on the type of editbox, as to what type of names to exclude
- maxResults
- - Numeric - arbitrary value assigned by Blizzard to determine how many buttons to include in the AutoComplete dropdown.
Note: Add 1 to allow for a disabled button that indicates there are more names than can be shown by the default AutoComplete dropdown.
- cursorPosition
- - Numeric - position of the cursor within the editbox.
Note: Can usually be obtained by EditBox:GetCursorPosition()
Returns
- nick1, nick2, ...
- String - a list of names matching the autocompletion request.
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())