Notification commands
Description
The Notification commands are used to get the user's attention by displaying a message or making a sound.
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
message As String |
|||
text As String |
|||
message As String, explanation As String, DefaultButtonCaption As String, CancelButtonCaption As String, AltButtonCaption As String, icon As Integer |
|||
url As String |
|||
text As String |
Method descriptions
Beep
The Beep command plays the system beep sound.
Beep
DebugLog(message As String)
Displays the specified message in the Messages pane.
Print(text As String)
Displays the specified text in a simple dialog box with an OK button.
Display "hello":
Print("Hello")
ShowDialog(message As String, explanation As String, DefaultButtonCaption As String, CancelButtonCaption As String, AltButtonCaption As String, icon As Integer) As 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.
Note
If you pass in an empty string to CancelButtonCaption or AltButtonCaption, then the button does not appear.
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:
Var result As String result = ShowDialog("Hello!", _ "Is it me you're looking for?", _ "Yes", "No", "", 1)
ShowURL(url As String)
Displays the url in the default web browser.
ShowURL("http://www.xojo.com")
Speak(text As String)
The Speak command speaks the supplied text.
Say "hello":
Speak("Hello")