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

Arguments

ชื่อชนิดคำอธิบาย
textstringMessage text.
captionstringWindow caption.
flagsnumberNumeric message box flags.

Returns

ชื่อชนิดคำอธิบาย
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.

เรียกด้วย parameter 3 ค่า: text, caption, flags ตาราง arguments อธิบายค่าที่จำเป็นและค่าที่ปรับพฤติกรรม

ส่งคืน result (integer) ใช้ตาราง returns เพื่อแยกค่าที่สำเร็จ ผลลัพธ์ nil และ error ที่จัดการต่อได้

ตัวอย่าง

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)