# Notification commands

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

The Notification commands are used to get the user's attention by displaying a message or making a sound.

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                         | Parameters                                                                                                                                                                                                                                                                                                        | Returns                          | Shared |
|--------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------|--------|
| `Beep<ide_scripting_notification_commands.beep>`             |                                                                                                                                                                                                                                                                                                                   |                                  |        |
| `DebugLog<ide_scripting_notification_commands.debuglog>`     | message As `String</api/data_types/string>`                                                                                                                                                                                                                                                                       |                                  |        |
| `Print<ide_scripting_notification_commands.print>`           | text As `String</api/data_types/string>`                                                                                                                                                                                                                                                                          |                                  |        |
| `ShowDialog<ide_scripting_notification_commands.showdialog>` | message As `String</api/data_types/string>`, explanation As `String</api/data_types/string>`, DefaultButtonCaption As `String</api/data_types/string>`, CancelButtonCaption As `String</api/data_types/string>`, AltButtonCaption As `String</api/data_types/string>`, icon As `Integer</api/data_types/integer>` | `String</api/data_types/string>` |        |
| `ShowURL<ide_scripting_notification_commands.showurl>`       | url As `String</api/data_types/string>`                                                                                                                                                                                                                                                                           |                                  |        |
| `Speak<ide_scripting_notification_commands.speak>`           | text As `String</api/data_types/string>`                                                                                                                                                                                                                                                                          |                                  |        |

## Method descriptions

<div id="ide_scripting_notification_commands.beep">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

**Beep**

> The Beep command plays the system beep sound.
>
> ``` xojo
> Beep
> ```

<div id="ide_scripting_notification_commands.debuglog">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

**DebugLog**(message As `String</api/data_types/string>`)

> Displays the specified *message* in the Messages pane.

<div id="ide_scripting_notification_commands.print">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

**Print**(text As `String</api/data_types/string>`)

> Displays the specified *text* in a simple dialog box with an OK button.
>
> Display "hello":
>
> ``` xojo
> Print("Hello")
> ```

<div id="ide_scripting_notification_commands.showdialog">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

**ShowDialog**(message As `String</api/data_types/string>`, explanation As `String</api/data_types/string>`, DefaultButtonCaption As `String</api/data_types/string>`, CancelButtonCaption As `String</api/data_types/string>`, AltButtonCaption As `String</api/data_types/string>`, icon As `Integer</api/data_types/integer>`) As `String</api/data_types/string>`

> The ShowDialog command displays a dialog box on the screen. You can specify the *message* and determine the buttons and their text. Returns a String containing the caption of the button that was pressed.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> If you pass in an empty string to *CancelButtonCaption* or *AltButtonCaption*, then the button does not appear.
>
> </div>
>
> Values for Icon are:
>
> | Value | Description                                     |
> |-------|-------------------------------------------------|
> | -1    | No icon                                         |
> | 0     | Note icon (App Icon on Mac)                     |
> | 1     | Caution icon (On Mac, App Icon is superimposed) |
> | 2     | Stop Icon (App Icon on Mac)                     |
> | 3     | Question Icon (App Icon on Mac)                 |
>
> Display a simple dialog:
>
> ``` xojo
> Var result As String
>
> result = ShowDialog("Hello!", _
>   "Is it me you're looking for?", _
>   "Yes", "No", "", 1)
> ```

<div id="ide_scripting_notification_commands.showurl">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

**ShowURL**(url As `String</api/data_types/string>`)

> Displays the *url* in the default web browser.
>
> ``` xojo
> ShowURL("http://www.xojo.com")
> ```

<div id="ide_scripting_notification_commands.speak">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

**Speak**(text As `String</api/data_types/string>`)

> The Speak command speaks the supplied *text*.
>
> Say "hello":
>
> ``` xojo
> Speak("Hello")
> ```
