Hey everyone,
Display dialog
A dialog box is basically just a box which displays some text with customizable buttons and possibly a text input box as shown in the image above.
To bring it up use the display dialog command. Type -
Display dialog "Text comes here"
Now compile and run it.
Display dialog with Text Field
A display dialog with a text field allows the user to enter whatever he wants to in the text box.
It is particularly useful if you want to create an interactive application. So, to use this command, type -
Display dialog "Text Here" default answer "Choose some default text of leave it blank"
Display dialog with Buttons
In a dialog box, the buttons are, by default, labelled "Okay" and "Cancel".
You can also customize these buttons to say whatever you want. Type -
Display dialog "Text Here" buttons {"label", "label2"}
Display dialog with a default Button
Replace label and label2 with you choice of labels. To make one of the buttons the default button, type -
Display dialog "Text Here" buttons {"label", "label2" default button 1}
Display dialog with an icon
To have a "stop" icon in the dialog box, type -
Display dialog "Text Here" with icon stop
Display dialog "Text Here" with icon note
(The note icon is actually your application's icon. Try saving it as an app and changing the icon of your application )
To have a "caution" icon in the dialog box, type -
Display dialog "Text Here" with icon caution
Thanks,
- Shiv