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)