Displaying Messages
It is often useful to display messages to inform the user that something has occurred,
to have the user answer a Yes/No question, or offer debugging information to help
determine why a script isn’t working as expected. Text information can be displayed
in the console window as described in the "Outputting Text" section.
More: