Miscellaneous

messagebox

Shows a Windows message box with text, caption, and numeric flags, then returns the integer result code.

Синтаксис

messagebox(text: string, caption: string, flags: number): integer

Аргументы

ИмяТипОписание
textstringMessage text.
captionstringWindow caption.
flagsnumberNumeric message box flags.

Возвраты

ИмяТипОписание
resultintegerInteger result code returned by the message box.

Описание

Shows a Windows message box with text, caption, and numeric flags, then returns the integer result code.

Вызывай с 3 параметрами: text, caption, flags. Таблица аргументов показывает обязательные значения и настройки поведения.

Возвращает result (integer). Используй таблицу возвращаемых значений, чтобы отличать успех, nil и обрабатываемые ошибки.

Пример

Show a Windows message box and read the integer result code returned by the dialog.

local result = messagebox("Real is ready.", "Real", 0)
print(result)