Luart
Comprehensive Windows framework to develop in Lua
modules > ui > warn

ui.confirm (msg , [title] )

Displays a confirmation message dialog box with a question-mark icon, and waits for the user to click the Yes, No or Cancel button.

Parameters

msg

A string that indicates the message to display to the user.

title

An optional string that indicates the title of the message dialog box (defaulting to "Confirmation")

Return value

This function returns the string:

Example


local ui = require "ui"

-- create a new Pipe to capture output of the "WMIC PATH Win32_Battery Get EstimatedChargeRemaining" command
if ui.confirm("Do you want to hear a sound ?") == "yes" then
	sys.beep()
end