• alert ?-w win? ?-t (critical|info|warning)? ?-k okStr? ?-c cancelStr? ?-o otherStr? ?-title titleStr? ?-index? ?--? message ?explanation?
This command will display the message string in a standard alert box.
If present, the explanation string will be displayed in the small
System font.
The options have the following meaning:
- the -c option specifies the title of the button in the Cancel position.
- the -k option specifies the title of the
button in the OK position (default value is OK).
- the -o option specifies the title of another button.
- the -t option specifies the icon that will be displayed with the dialog.
Possible values are critical, info, or warning.
The default value is warning.
- the -title option specifies a title to
display in the title bar of the alert window.
- the option
--
specifies the end of the options.
If cancelStr or otherStr is an empty string or is not
specified, the corresponding button will be omitted. There is always at
least one button (it is the default button in the -k position).
By default, the command returns the name of the button that was
pressed but, if the -index option is specified,
it returns the button's index (starting at 0 for the rightmost button).
If the -w option is specified, the alert is displayed in a
sheet window attached to the window designated by the win argument.
Otherwise, the alert is displayed as a modal dialog.