interactively puts up expr as a dialog notebook, waits until a DialogReturn[e] is evaluated from within it, and then returns the result e.


sets up local variables x, y, in expr.

Details and Options

  • The Wolfram Language kernel in which DialogInput is evaluated will block until the DialogReturn in the dialog is evaluated.


open allclose all

Basic Examples  (1)

Scope  (2)

Use a dialog input window to set a variable:

Enter some text in the field and click Proceed to set res:

Set res to True or to False, depending which button is clicked:

Properties & Relations  (5)

This uses DialogReturn[] to return from the dialog notebook:

DefaultButton[] can be used instead of an explicit DialogReturn[]:

CancelButton[] implicitly uses DialogReturn[$Canceled]:

Input[] puts up a special dialog window for entering an expression:

InputString[] puts up a special dialog window for entering a string:

Possible Issues  (1)

DialogInput blocks the queued evaluation channel, preventing queued controls from working:

Some values of SynchronousUpdating also use the queued channel and are blocked:

For Manipulate, the default value of SynchronousUpdating must be changed for it to work:

Scheduled tasks might not run while the queued evaluation channel is blocked:

Introduced in 2007