Skip to content

dos_msgbox

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Creates, displays and operates a Windows message box, or dialog, box. The message box contains an application-defined message and title plus any combination of predefined icons and push buttons. An optional duration allows the message box to be closed automatically.

Syntax

(dos_msgbox text title button icon [duration])

Parameters

text

The message to be displayed.

title

The message box title.

button

The push button format. The allowable values are as follows:

Value Description
0 Abort, Retry and Ignore
1 OK
2 OK and Cancel
3 Retry and Cancel
4 Yes and No
5 Yes, No and Cancel

icon

The icon. The allowable values are as follows:

Value Description
0 Asterisk
1 Exclamation
2 Hand
3 Information
4 Question
5 Stop

duration

The duration time in seconds. Note, duration only works with button bit values 1, 2, 3 and 5

Returns

An integer indicating one of the following buttons was pressed:

Value Description
0 Abort
1 Cancel
2 Ignore
3 No
4 OK
5 Retry
6 Yes

nil if not successful or on error.

Example

Command: (dos_msgbox "Are you sure?" "Save" 4 3)
6

Clone this wiki locally