Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

WaitTextEntry

Searches for a currently pending text entry dialog and responds to it; if none is pending, installs a hook for the next incoming one.

Value — the text to automatically enter.

The method first checks if a text entry dialog is already present. If so, the text is submitted immediately. If no dialog is pending, a hook is installed — when the server sends a text entry dialog, the specified text is automatically submitted.

Deprecated. This method is imprecise because it responds to any text entry dialog indiscriminately. For more precise control, consider handling text entry dialogs via event handlers.

Does nothing if the character is not connected.

Ищет текущий ожидающий диалог ввода текста и отвечает на него; если такого нет, устанавливает ловушку на следующий входящий.

Value — текст для автоматического ввода.

Метод сначала проверяет, есть ли уже ожидающий диалог ввода текста. Если да — текст отправляется немедленно. Если нет — устанавливается ловушка: при получении от сервера диалога ввода текста указанный текст будет отправлен автоматически.

Устарел. Этот метод неточен, поскольку отвечает на любой диалог ввода текста без разбора. Для более точного контроля рекомендуется использовать обработчики событий.

Не выполняет действий, если персонаж не подключён.

Pascal

procedure WaitTextEntry(Value: String);

Python

def WaitTextEntry(Value: str) -> None: ...

Pascal Example

begin
  WaitTextEntry('MyAnswer');
  UseObject(FindItem);
  Wait(2000);
end.

Python Example

WaitTextEntry('MyAnswer')
UseObject(FindItem())
Wait(2000)

See Also

ConsoleEntryReply, ConsoleEntryUnicodeReply