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

MenuHookPresent

Returns True if there are pending menu hooks set by AutoMenu, False otherwise.

A menu hook is consumed when the corresponding menu arrives from the server.

Returns False if the character is disconnected.

Возвращает True, если есть ожидающие хуки меню, установленные через AutoMenu, иначе False.

Хук меню потребляется при получении соответствующего меню от сервера.

Возвращает False, если персонаж не подключён.

Pascal

function MenuHookPresent: Boolean;

Python

def MenuHookPresent() -> bool: ...

Pascal Example

begin
  AutoMenu('Tinkering', 'Tools');
  AddToSystemJournal('Hook pending: ' + BoolToStr(MenuHookPresent, True));
  UseObject(FindItem);
  Wait(2000);
  AddToSystemJournal('Hook still pending: ' + BoolToStr(MenuHookPresent, True));
end.

Python Example

AutoMenu('Tinkering', 'Tools')
AddToSystemJournal(f'Hook pending: {MenuHookPresent()}')
UseObject(FindItem())
Wait(2000)
AddToSystemJournal(f'Hook still pending: {MenuHookPresent()}')

See Also

AutoMenu, MenuPresent, WaitMenu, CancelAllMenuHooks