ไวยากรณ์
messagebox(text: string, caption: string, type: integer): integerArguments
| ชื่อ | ชนิด | คำอธิบาย |
|---|---|---|
text | string | ค่าข้อความที่ใช้โดยการดำเนินการ |
caption | string | ชื่อหน้าต่างที่แสดงบนกล่องข้อความ |
type | integer | รูปแบบกล่องข้อความและการกำหนดค่าปุ่ม |
Returns
| ชื่อ | ชนิด | คำอธิบาย |
|---|---|---|
button | integer | ตัวระบุปุ่มที่ผู้ใช้คลิก |
คำอธิบาย
แสดงกล่องข้อความดั้งเดิมและส่งกลับรหัสปุ่มที่คลิก
เรียกด้วย parameter 3 ค่า: text, caption, type ตาราง arguments อธิบายค่าที่จำเป็นและค่าที่ปรับพฤติกรรม
ส่งคืน button (integer) ใช้ตาราง returns เพื่อแยกค่าที่สำเร็จ ผลลัพธ์ nil และ error ที่จัดการต่อได้
ตัวอย่าง
ตัวอย่างการเรียกใช้ด้วยค่าตัวอย่าง
local result = messagebox("example", "example", 1)
print(result)