How to auto close a alert box without user intervention.
Programatically want to close the alert box.
How to auto close a alert box without user intervention.
Programatically want to close the alert box.
You can't. You will have to implement your own dialog with a timer. The dialog your build must fit your UI: ABL GUI, GUI for .NET or TTY
I'll assume it's Windows, because otherwise, Mike's answer is completely true. The only form I can think of doing this is having it expire over time.
I've messed a little and found this. Just tested, and it works. 2000 is the time in miliseconds you want the message to wait before it expires. Mess with the '3' parameter to see other button choices (So far I've found 0 to 6 works). Hope this helps.
PROCEDURE MessageBoxTimeoutA EXTERNAL "user32.dll":
DEFINE INPUT PARAMETER hwnd AS LONG NO-UNDO.
DEFINE INPUT PARAMETER lpText AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER lpCaption AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER uType AS LONG NO-UNDO.
DEFINE INPUT PARAMETER wLanguageID AS LONG NO-UNDO.
DEFINE INPUT PARAMETER lngMilliseconds AS LONG NO-UNDO.
DEFINE RETURN PARAMETER ans AS LONG NO-UNDO.
END PROCEDURE.
DEFINE VARIABLE i AS INTEGER NO-UNDO.
RUN messageBoxTimeoutA (0, "Test","test2", 3 , 0, 2000, OUTPUT i ).
DISPLAY i.
My example has buttons yes-no-cancel. The value of i will be 6 for yes, 7 for no, 2 for cancel and 32000 if timeout.