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

WaitJournalLineSystem

Waits for a specific text to appear in the journal from the “System” sender, starting from a given timestamp.

StartTime — timestamp (TDateTime in Pascal, datetime.datetime in Python) from which to start scanning.

Str — text to search for. Supports the pipe | separator for multi-string search.

MaxWaitTimeMS — maximum wait time in milliseconds. 0 = wait indefinitely.

Returns True if the text was found within the timeout, False otherwise.

This method is identical to WaitJournalLine, but only matches journal entries where the sender name (LineName) is "System". All other journal entries are ignored during the search.

Ожидает появления указанного текста в журнале от отправителя «System», начиная с заданной метки времени.

StartTime — метка времени (TDateTime в Pascal, datetime.datetime в Python), начиная с которой сканируется журнал.

Str — искомый текст. Поддерживает разделитель | для поиска нескольких строк.

MaxWaitTimeMS — максимальное время ожидания в миллисекундах. 0 — ждать бесконечно.

Возвращает True, если текст найден, False — в противном случае.

Метод идентичен WaitJournalLine, но выбирает только записи журнала, где имя отправителя (LineName) равно "System". Все остальные записи журнала при поиске игнорируются.

Pascal

function WaitJournalLineSystem(StartTime: TDateTime; Str: String; MaxWaitTimeMS: Integer): Boolean;

Python

def WaitJournalLineSystem(start_time: datetime.datetime, text: str, max_wait_ms: int = 0) -> bool: ...

Pascal Example

var
  T: TDateTime;
begin
  T := Now;
  UOSay('.help');
  if WaitJournalLineSystem(T, 'Available commands', 5000) then
    AddToSystemJournal('System response received')
  else
    AddToSystemJournal('No system response');
end.

Python Example

import datetime
t = datetime.datetime.now()
UOSay('.help')
if WaitJournalLineSystem(t, 'Available commands', 5000):
    AddToSystemJournal('System response received')
else:
    AddToSystemJournal('No system response')

See Also

WaitJournalLine, InJournal, LineName