Skip to main content

Dialog:show()

If you invoke this function the dialog will popup in the screen

Parameters

ParametersTypeDescription
timeoutMsnumberOptional timeout in milliseconds before the dialog auto-confirms

Signature

Dialog:show(): void
Dialog:show(timeoutMs: number): void

Returns

void

Description

Dialog:show() displays the dialog and waits for the user to press OK or Cancel.

If you pass timeoutMs, the dialog will automatically trigger the positive button after the given delay. This is useful when you want to show parameters briefly but continue execution automatically.

Examples

Dialog:init()
Dialog:setTitle("Confirm action")
Dialog:setMessage("Press OK to continue")
Dialog:show()
Dialog:init()
Dialog:setTitle("Quick notice")
Dialog:setMessage("This dialog will continue automatically")
Dialog:show(3000)

Notes

  • Dialog:show() is equivalent to Dialog:show(0)
  • A timeout value greater than 0 enables auto-confirm behavior
  • If the user cancels or dismisses the dialog, macro execution throws an exception