InJournal
Searches the journal for the specified string, scanning from the newest entry backward.
Str — the text to search for (case-insensitive substring match). Supports searching for multiple strings using the pipe | separator. For example, 'gold|silver|copper' finds a line containing any of these words.
Returns the line index of the found entry, or -1 if no match was found. The search starts from the entry set by SetJournalLine and goes backward toward older entries.
After a successful match, the following Line* properties are updated with data from the found entry: LineID, LineName, LineTime, LineMsgType, LineType, LineTextColor, LineTextFont, LineIndex, LineCount.
Ищет указанную строку в журнале, просматривая записи от последней к первой.
Str — текст для поиска (регистронезависимый поиск подстроки). Поддерживает поиск нескольких строк через разделитель |. Например, 'gold|silver|copper' найдёт строку, содержащую любое из этих слов.
Возвращает индекс найденной строки или -1, если совпадений не найдено. Поиск начинается от записи, установленной через SetJournalLine, и идёт назад к более старым записям.
После успешного нахождения обновляются следующие свойства Line* данными из найденной записи: LineID, LineName, LineTime, LineMsgType, LineType, LineTextColor, LineTextFont, LineIndex, LineCount.
function InJournal(Str: String): Integer;
def InJournal(Str: str) -> int: ...
begin
SetJournalLine(HighJournal);
UOSay('bank');
Wait(2000);
if InJournal('balance|gold|withdraw') >= 0 then
AddToSystemJournal('Found bank-related message at line ' +
IntToStr(LineIndex) + ': ' + Journal(LineIndex));
end.
SetJournalLine(HighJournal())
UOSay('bank')
Wait(2000)
if InJournal('balance|gold|withdraw') >= 0:
AddToSystemJournal(f'Found bank-related message at line {LineIndex()}: {Journal(LineIndex())}')
InJournalBetweenTimes, Journal, WaitJournalLine, SetJournalLine, ClearJournal, LineName, LineTime, LineID, LineMsgType, LineType