User Interaction
BEEP |
|
Emit a tone through the computer's speaker.
INPUTBOX$ |
Return-str = INPUTBOX$(msg-str [, Title-str [, Default-str [,Use-Pass ]]]) |
INPUTBOX$ is used to prompt the user to input a value. The value is returned in Return-str. Note that except for the message string, all the other parameters are optional.
Msg-str is a string expression containing the message to show and prompt the user.
Title-str is a string expression containing the title of the message box. If omitted, the title will be ThinBasic.
Default-str is a string expression containing the default starting value of the answer box. If omitted, the default value will be an empty (null) string.
Use-Pass is a TRUE/FALSE flag to allow entry of password values. If you specify this as TRUE, your input will be obscured with * asterisks. This option is probably not of much use in SPFLite macros.
INPUTBOX$ will allow you to click OK (or press Enter) or click Cancel. If you click on Cancel, the function will return an empty (null) string as a response, even if you typed something into the text box.
Note: If you use this function, you should consider using the SPF_Loop_Check function as well.
MSGBOX |
num-var = MSGBOX(hParent, Message [, Dialog-Style [, Title [, Timeout [, UpdateCountDown, [, CountDownFormat ] ]] ] ] ) |
Name |
Type |
Optional |
Meaning |
hParent |
Number |
No |
Handle to the owner window of the message box to be created. If this parameter is zero, the message box has no owner window. Always code this as 0 (zero) |
Message |
String |
No |
A string expression that contains the message to be displayed. |
Dialog-Style |
Number |
Yes |
Specifies the contents and behavior of the dialog box. This parameter can be a combination of flags from the groups of flags allowed below for Dialog-Style. |
Title |
String |
Yes |
A string expression that contains the dialog box title. If this parameter is an empty string, the default title "thinBasic" will be used. |
Timeout |
Number |
Yes |
Number of milliseconds after which the message box will automatically exit with a %IDTIMEOUT return code. |
UpdateCountDown |
Number |
Yes |
Number of milliseconds time window for window caption count down update. If not present, no count down will be shown |
CountDownFormat |
String |
Yes |
Format of the count down. If not present a standard one will be used. |
Display a Message Box for showing user any message and/or get user response.
NOTE: A call to MSGBOX can cause SPFLite to detect an apparent "loop" condition, because a macro that calls MSGBOX may wait indefinitely until the user clicks on OK or a similar button. You can control how SPFLite handles this situation by calling the function SPF_Loop_Check.
NOTE: thinBasic supports the additional MSGBOX parameters: Timeout, UpdateCountDown and CountDownFormat. See the thinBasic documentation for more details. These options may not be useful in SPFLite macros.
Dialog-style is an equate to control the style of the box. It may be one of the following. These are numeric equate values. If you want more than one option, you can add options together. For example, to create a Yes/No box with NO as the default button, and a "warning" icon, you can specify the dialog style as %MB_YESNO+%MB_DEFBUTTON2+%MB_ICONWARNING. You can also use the OR operator instead of a + sign.
Symbol |
Meaning |
%MB_OK |
The message box contains one push button: OK. This is the default. Because this style is the default, and the operand can be omitted, the shortest MSGBOX call you can write is MSGBOX(0,"message"). |
%MB_OKCANCEL |
The message box contains two push buttons: OK and Cancel. |
%MB_YESNO |
The message box contains two push buttons: Yes and No. |
%MB_YESNOCANCEL |
The message box contains three push buttons: Yes, No, and Cancel. |
%MB_RETRYCANCEL |
The message box contains two push buttons: Retry and Cancel. |
%MB_ABORTRETRYIGNORE |
The message box contains three push buttons: Abort, Retry, and Ignore. |
%MB_CANCELTRYCONTINUE |
The message box contains three push buttons: Cancel, Try Again, Continue. |
%MB_DEFBUTTON1 |
The first button is the default button. |
%MB_DEFBUTTON2 |
The second button is the default button. |
%MB_DEFBUTTON3 |
The third button is the default button. |
%MB_ICONEXCLAMATION |
An exclamation-point icon appears in the message box. |
%MB_ICONERROR |
A stop-sign icon appears in the message box. |
%MB_ICONINFORMATION |
An icon consisting of a lowercase letter i in a circle appears in the message box. |
%MB_ICONQUESTION |
A question-mark icon appears in the message box. |
%MB_ICONSTOP |
A stop-sign icon appears in the message box. |
%MB_ICONWARNING |
An exclamation-point icon appears in the message box. |
%MB_ICONASTERISK |
An icon consisting of a lowercase letter i in a circle appears in the message box. |
%MB_ICONHAND |
A stop-sign icon appears in the message box. |
%MB_APPLMODAL |
This option may not be useful in SPFLite macros |
%MB_SYSTEMMODAL |
This option may not be useful in SPFLite macros |
%MB_TOPMOST |
This option may not be useful in SPFLite macros |
%MB_HELP |
Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends a %WM_HELP message to the owner. This option may not be useful in SPFLite macros |
num-var is a variable containing the user's response, which is useful if the message box contains more than one button to click on. It can contains one of the following equate values:
Symbol |
Meaning |
%IDABORT |
ABORT button was clicked |
%IDCANCEL |
CANCEL button was clicked |
%IDCONTINUE |
CONTINUE button was clicked |
%IDIGNORE |
IGNORE button was clicked |
%IDNO |
NO button was clicked |
%IDOK |
OK button was clicked |
%IDRETRY |
RETRY button was clicked |
%IDTRYAGAIN |
TRYAGAIN button was clicked |
%IDYES |
YES button was clicked |
%IDTIMEOUT |
Timeout parameter was supplied, and MSGBOX timed out waiting for a user response |
NOTE: If you use this function, you should consider using the SPF_Loop_Check function as well.
Created with the Personal Edition of HelpNDoc: Maximize Your PDF Protection with These Simple Steps