utils.umsgbox

Display a message box and get a response (Unicode)

Prototype

response = utils.umsgbox ( msg, title, type, icon, default )

Description

This lets you display a Windows message box (very similar to MsgBox in VBscript). The intention is to allow you to display (in a small dialog box), information of an urgent nature, or ask a yes/no type question.

The calling sequence is:

result = utils.msgbox ( msg, title, type, icon, default )
The only required argument is the message text itself, the others default to their first possible value. The first 4 arguments are string arguments, the last is a number. Return value = (string) yes, no, ok, retry, ignore, cancel, abort

Example:

print (utils.umsgbox ("You are being paged", "Warning!", "ok", "!", 1)) --> ok
print (utils.umsgbox ("You are being paged")) --> ok
print (utils.umsgbox ("Go ahead?", "Question", "yesno", "?")) --> yes / no
See also utils.msgbox if you want to display a message in straight ASCII (not Unicode).

Lua functions

Topics