HOT DOG Linux


How To Show A Text Field Dialog

From the shell, run the command:
$ hotdog input OK Cancel "This is a text field dialog." "Field:" "Initial Text"

The second argument contains the text for the OK button.

The third argument contains the text for the Cancel button.

The fourth argument contains the text for the dialog.

The fifth argument contains the label text for the field.

The sixth argument contains the initial contents of the text field.


The style of dialog will be determined by the environment variable HOTDOG_MODE.

To force a dialog to be in a specific style:

$ HOTDOG_MODE="winmac" hotdog input OK Cancel "This is a text field dialog." "Field:" "Initial Text"

$ HOTDOG_MODE="hotdogstand" hotdog input OK Cancel "This is a text field dialog." "Field:" "Initial Text"

$ HOTDOG_MODE="amiga" hotdog input OK Cancel "This is a text field dialog." "Field:" "Initial Text"

$ HOTDOG_MODE="atarist" hotdog input OK Cancel "This is a text field dialog." "Field:" "Initial Text"

$ HOTDOG_MODE="macclassic" hotdog input OK Cancel "This is a text field dialog." "Field:" "Initial Text"

$ HOTDOG_MODE="maccolor" hotdog input OK Cancel "This is a text field dialog." "Field:" "Initial Text"

$ HOTDOG_MODE="macplatinum" hotdog input OK Cancel "This is a text field dialog." "Field:" "Initial Text"

$ HOTDOG_MODE="aqua" hotdog input OK Cancel "This is a text field dialog." "Field:" "Initial Text"


If the user clicks the OK button, then the contents of the text field will be written to STDOUT followed by a newline, and the exit code will be 0.

If the user clicks the Cancel button or the user closes the dialog, possibly by clicking the window close button or hitting the Escape key, then nothing will be written to STDOUT, and the exit code will be 1.