Skip to main content

DoAlert

DoAlert [/T=titleStr] alertType, promptStr

The DoAlert operation displays an alert dialog and waits for user to click a button.

Parameters

alertType =
0:Dialog with an OK button.
1:Dialog with Yes and No buttons.
2:Dialog with Yes, No, and Cancel buttons.
promptStrText displayed in the alert dialog.

Flags

/T=titleStrChanges the title of the dialog window from the default title.

Details

DoAlert sets the special variable
V_flag =
1:Yes clicked.
2:No clicked.
3:Cancel clicked.

As of Igor 10, promptStr can contain a subset of HTML 4. For a description of the supported HTML 4 subset, see https://doc.qt.io/qt-6/richtext-html-subset.html

Example

Macro example()
String msg= "<p style=\"color:red;\">This is red text.</p>"
msg += "<p>Click <a href=\"https://www.wavemetrics.com/\">here to buy Igor</a>.</p>"
DoAlert/T="Buy Igor!" 0, msg
End