inputerr statement (Windows)

When run from a trigger, from the D3 File Manager, or from a Visual Basic rule module, the inputerr statement displays a dialog box (allowing the user to specify the title, text, and buttons), then waits for input. Upon return, the system(0) function returns a numeric code indicating the user choice.

Note: When running a FlashBASIC rule module through an ODBC connection, the rule module is executed on the server. Therefore, an inputerr displays the message box on the server, not on the client. Using a RPC connection, the rule module runs on the client and the message box displays on the client, as expected.

When run from a trigger, inputerr prevents the operation from being applied to the file system, if it involves a file system update (write, clear file, delete item).

inputerr has one string argument. If the argument is null, no dialog box displays. If the string is not null, it is formatted:

inputerr {text{^title{^style}}}

Parameter(s)

^ Attribute mark.
text Text of the message box.
title Optional title. If the title is omitted, the default Error text displays.
style Numeric code for the message box buttons. The numeric codes can be created by adding together one or more of the EQUATES shown below as defined in dm,bp,includes nt_defs.inc:
Buttons
NT$MSGBOX$OK OK (default)
NT$MSGBOX$OKCancel OK CANCEL
NT$MSGBOX$AbortRetryIgnore ABORT RETRY IGNORE
NT$MSGBOX$YesNoCancel YES NO CANCEL
NT$MSGBOX$YesNo YES NO
Icons
NT$MSGBOX$Critical Critical error stop
NT$MSGBOX$Exclamation Exclamation point
NT$MSGBOX$Information Information (default)
NT$MSGBOX$Question Question mark
Default Buttons
NT$MSGBOX$DefButton1 Button 1 (default)
NT$MSGBOX$DefButton2 Button 2
T$MSGBOX$DefButton3 Button 3
NT$MSGBOX$DefButton4 Button 4
Modal State
NT$MSGBOX$AppModal Application modal (default)
NT$MSGBOX$SysModal System modal
NT$MSGBOX$TaskModal Task modal (similar to application modal)
inputerr returns when the user makes a selection, and system(0) returns a numeric code indicating the user choice:
NT$MSGBOX$SEL$YES Yes
NT$MSGBOX$SEL$NO No
NT$MSGBOX$SEL$OK OK
NT$MSGBOX$SEL$CANCEL Cancel
NT$MSGBOX$SEL$IGNORE Ignore
NT$MSGBOX$SEL$RETRY Retry
NT$MSGBOX$SEL$ABORT Abort

Example(s)

This example displays a dialog box to prompt the user to insert a floppy. The message box has a title Format, two buttons (OK and CANCEL), and a question mark icon:

INCLUDE DM,BP,INCLUDES NT_DEFS.INC
MsgFmt = NT$MSGBOX$OKCancel + NT$MSGBOX$Question
INPUTERR “Insert floppy and press OK”:AM:”Format”:AM:MsgFmt
IF SYSTEM(0) = NT$MSGBOX$SEL$CANCEL THEN
   * User selected CANCEL
   ...
END