From dos_lib help:
dos_getprogress
--------------------------------------------------------------------------------
Displays a modeless dialog box that consists of a message, a progress bar, and an optional cancel button. Because the dialog box is modeless, you can use it when performing long processes that can be interrupted by the user. The function is called once with arguments to initialize the dialog box. Then, it is called any number of times to move the progress bar in an absolute or relative manner. It is called with no arguments to check the open status of the dialog box. It can be called with a T argument to close the dialog box.
Syntax
(dos_getprogress title message maxvalue [T])
(dos_getprogress abs/-rel)
(dos_getprogress T)
(dos_getprogress)
Parameters
title
A string containing the dialog box title.
message
A string containing a message.
maxvalue
An integer representing the maximum range value (between 0 and maxvalue) of the progress bar.
abs/-rel
An absolute position to move the progress meter, or a relative position (denoted with a negative sign) to move the progress meter.
T
If specified during the creation of the dialog box, an optional Cancel button is displayed. Otherwise, T closes the dialog box.
Returns
Returns nil when initializing, incrementing, and closing the dialog box.
When checking the open status, it return T if the dialog box is open, otherwise, nil is returned
Examples
Command: (setq x 0 y 1000)
1000
Command: (dos_getprogress "Testing" "Testing, please wait..." y)
nil