Documents

MSG

Displays a modal dialog box that contains a system icon, a set of buttons, and a brief application-specific message, such as status or error information. The message box returns an integer value that indicates which button the user clicked.

Syntax
msg(text)
msg(text, title)
msg(text, title, flags)

Parameters
text The message to be displayed.
title The dialog box title. If this parameter is NULL, the default title is Nilesoft Shell.
flags The contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags.
Flags

To display an icon in the message box, specify one of the following values.
msg.error
A stop-sign icon appears in the message box.
msg.question
A question-mark icon appears in the message box.
msg.warning
An exclamation-point icon appears in the message box.
msg.info
An icon consisting of a lowercase letter i in a circle appears in the message box.

To indicate the buttons displayed in the message box, specify one of the following values.
msg.ok
The message box contains one push button: OK. This is the default.
msg.okcancel
The message box contains two push buttons: OK and Cancel.
msg.yesnocancel
The message box contains three push buttons: Yes, No, and Cancel.
msg.yesno
The message box contains two push buttons: Yes and No.

To indicate the default button, specify one of the following values.
msg.defbutton1
The first button is the default button.
msg.defbutton2
The second button is the default button.
msg.defbutton3
The third button is the default button.

To indicate the modality of the dialog box, specify one of the following values.
msg.applmodal
The user must respond to the message box before continuing work in the current window. However, the user can move to the windows of other threads and work in those windows.
msg.taskmodal
Same as msg.applmodal except that all the top-level windows belonging to the current thread are disabled.

To specify other options, use one or more of the following values.
msg.right
The text is right-justified.
msg.rtlreading
Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems.
msg.setforeground
The message box becomes the foreground window.
msg.topmost

Return value

If a message box has a Cancel button, the function returns the msg.idcancel value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC will no effect - unless an msg.ok button is present. If an msg.ok button is displayed and the user presses ESC, the return value will be msg.idok.

If the function fails, the return value is zero.
If the function succeeds, the return value is one of the following values:

msg.idok or 1
The OK button was selected.
msg.idcancel or 2
The Cancel button was selected.
msg.idyes or 6
The Yes button was selected.
msg.idno or 7
The No button was selected.
Examples
msg("Hello, Warld!","NileSoft Shell", msg.info | msg.ok)
msg("Hello, Warld!","NileSoft Shell")
msg("Hello, Warld!")


msg.beep(type)

Plays a waveform sound. The waveform sound for each sound type is identified by an entry in the registry.

Syntax

sys.beep
sys.beep(msg.error)
sys.beep(msg.warning)

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub