GETS Mnemonic - Create Message Dialog

Syntax

'GETS'(title,prompt{,default})

Description

The 'GETS' mnemonic displays a dialog box with the specified title and message text prompt, then waits for the user to type a string response. If desired, a default response may be provided, which appears in the edit box and will be used when the user clicks OK or presses the <Return> key. Once the response is confirmed with either the <Return> key or by clicking OK, the dialog box is dismissed. The response text is injected into the keyboard buffer for reading with a subsequent READ or INPUT statement. If the user closes or cancels the dialog, an !ERROR=29 is generated at the PRINT or WRITE verb containing the 'GETS' mnemonic.

Parameter

Description

title

Sets the text in the title bar.

prompt

Message text displayed in the body of the dialog.

default

The optional default response. If this parameter is not provided, the response text is initially blank.

As with other Windows applications, the user may edit the response text with the mouse, cursor keys, and edit keys. Three buttons, OK, Cancel, and Restore, appear in the dialog.

Button

Function

OK

Transmits the response string as it currently appears in the edit box with a terminating carriage return.

Cancel

Dismisses the dialog and generate an !ERROR=29. (Closing the dialog has the same effect as Cancel.)

Restore

Causes the string in the edit box to revert to its initial value. (Note that it does not close the dialog.)

See Also

Mnemonics - Alphabetical Listing

Mnemonics - Group Listing