Equinox Online Help - Language Reference - A to Z

Home

Input

Applies to
SyntaxInput(MessageExpression [, SwitchExpression])
Action[Function] Prompts you to input data.
ScopeUsable anywhere.
Notes

This function generates a dialog which prompts you to type data into a text box. MessageExpression is a string that appears on the dialog. You should use it to tell the user what data to enter. If the optional argument, SwitchExpression, evaluates to True, then OK and Cancel buttons appear on the dialog. If SwitchExpression is False then no buttons appear. If omitted, SwitchExpression, defaults to False.

The user types in the required text and then presses the Return key or chooses the OK button. The text is returned by the function, as a string.

This function also sets the SysReply system workarea:

  • 0 Value returned (as normal)
  • -1 User pressed the Escape key, or chose the Cancel button
  • -2 No response (timeout error)
  • -3 Undefined error

You can use the PopupSize statement to define the width (but not height) of then Input dialog, if MessageExpression is too long for the default dialog.

CategoryUser dialogs
See Also Alert, AlertBitmaps, AlertButtons, Beep, Edit, HelpAbout, InputPassword, Message, PopupColour_PopupColor, PopupFlags, PopupFont, PopupJustification, PopupSize, PopupTitle, StatusLine
Example

The following example uses the Input function to request an account number from the user. If the operator presses the Escape key, the operation is aborted.

while AccountNo = ""
PopupTitle "Error"
AccountNo = Input("You must enter an account Number",true)

if sysreply then
RestoreRecord
exit Method
end if
end while