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 parameter: text, caption, flags. يوضح جدول arguments القيم المطلوبة والقيم التي تضبط السلوك.

يعيد result (integer). استخدم جدول returns للفصل بين قيم النجاح ونتائج 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)