ไวยากรณ์
messagebox(text: string, caption: string, flags: number): integerArguments
| ชื่อ | ชนิด | คำอธิบาย |
|---|---|---|
text | string | Message text. |
caption | string | Window caption. |
flags | number | Numeric message box flags. |
Returns
| ชื่อ | ชนิด | คำอธิบาย |
|---|---|---|
result | integer | Integer 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)